Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.3.2, 6.4.0
-
None
-
I can only test it on ARM platform (Apple M1 Pro) and Linux/Windows VMs on ARM. But ARM Windows is using the x86 Qt packages...
-
-
436159
Description
Hello Qt team,
First, thank you for this solid framework.
I use QPalette to switch between a light mode and a dark mode in my QWidget application.
Using the Fusion style, the switch isn't applied to the background of QComboBox and all the headers of the QAbstractItemView family.
You can see attached a simple example, with the source code.
Dark palette:
After resizing the window and the size of the first column header, these problematic widgets are painted properly.
When the resize is little, resizing back to the original size brings back the wrong color. Bigger resize is needed to "overwrite" the cached paint.
For the QComboBox, I found a way to temporarily fix the painting : resizing programmatically :
In CustomComboBox: for(int i = 40; i < 500 ; i++){ this->setFixedWidth(i); this->repaint(); } this->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); this->update();
For QHeaderView, it becomes more of a hassle, so here I am reporting this bug.
Thanks !