Page 1 of 1

Stylesheet and tree widget functions

Posted: Wed Nov 07, 2018 3:34 pm
by sanikval
Hi all,

if in the stylesheet use the properties of color or font:

QTreeView [type = "trees"] :: item
{
border-bottom: 1px solid;
}

then functions, like tree.setBackColor, don't work.


Any ideas? This is a bug or feature?

Re: Stylesheet and tree widget functions

Posted: Mon Nov 12, 2018 9:16 am
by schneebergera
Hello,

this is not related to stylesheet.
//backCol() change background color.
Please have a look to to find more detailed examples.

best regards,
Andreas

Re: Stylesheet and tree widget functions

Posted: Mon Nov 12, 2018 9:26 am
by primv
if in the stylesheet use the properties border, font, color etc:
QTreeView [type = "trees"] :: item
{
border-bottom: 1px solid;
}
then functions, like tree.setBackColor, don't work.

if in the stylesheet use the properties padding, margin etc or nothing:
QTreeView [type = "trees"] :: item
{
padding: 4px;
}
then functions, like tree.setBackColor, is work.