Strange stylesheet behavior with QListView::item
-
@raven-worx Same behavior without the object name.
-
@qwasder85
When do you set the stylesheet exactly? -
@raven-worx said in Strange stylesheet behavior with QListView::item:
@qwasder85
When do you set the stylesheet exactly?I set it application-wide in the main.
-
Hi
It works for me on win 10, Qt 5.10
Stylesheet applied directly on listview -
Hi
It shows that ::item also works with # selector as
i apply the gradient with style sheet as seen in shot.I was not sure if padding would be visible easy in icon mode
so i used grad instead.so maybe the ::item do not support
padding-leftI will try that directly tonight.
-
@mrjj It definitely supports padding, it does so in the "selected" and "hover" states without any issue. I can also eliminate a conflict with inheritance, since the behavior stays the same when I deactivate my application-wide stylesheet and set it for the table view directly.
-
@qwasder85 I also can't get your stylesheet to apply to a
QListView
however, as a "hack", if you useborder-left:10px solid transparent
, you should get the padding you need. I know it's not right and it's not pretty but it works. -
@qwasder85 It would indeed appear to be a bug.
Your stylesheet seems correct and I would expect the
padding-left
to be applied as per your CSS however in this instance (and bizarrely, only when hovering) it doesn't get applied.Maybe raise it as a bug through the official channels?