Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I achieve consistent highlighting of QListWidget items across widget states?

Tags:

I am using PyQT 4.8.3 to create a dialog with two QListWidgets both allowing multiple selection.

  1. I find that if these QListWidgets are enabled, the selected items are highlighted in blue only when the QListWidget has focus, without focus the highlight is light-grey.

  2. I also find that if the QListWidgets are disabled, the selected items are highlighted in blue despite lack of focus.

enter image description here

As the users go from one list to the other they will find this very confusing.

As a developer I find the light-grey/unfocused, blue/disabled behaviours undesirable. I would appreciate any advice on modifying them.

I've looked through the docs for QListWidget, QListView and QAbstractView without finding anything applicable, I have also looked through the stylesheet documentation without having any luck.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!