windowsvista style causes hover animation to 'flicker' or 'jitter'
-
Hello all,
When I set 'windowsvista' as the style, hovering over widgets causes them to flicker. See GIF for details.
Here is the code to reproduce it in a stock standard fresh install of Qt with Qt Creator:
#include <QApplication> #include <QStyleFactory> #include <QSpinBox> #include <QVBoxLayout> #include <QCheckBox> #include <QMainWindow> #include <QRadioButton> int main(int argc, char *argv[]) { auto a = QApplication(argc, argv); a.setStyle(QStyleFactory::create("windowsvista")); auto w = QMainWindow(); auto* l = new QVBoxLayout(); l->addWidget(new QSpinBox()); l->addWidget(new QCheckBox()); l->addWidget(new QRadioButton()); auto* top = new QWidget(); top->setLayout(l); w.setCentralWidget(top); w.show(); return a.exec(); }
Unfortunately we can't just use one of the other themes/styles due to... shall we say... bureaucratic reasons.
For context. We are upgrading our application from Qt version 5.6.3 to 6.8.2.
My machine is running Windows 11 and as far as I know this issue also happens on Windows 10 machines.
Using MSVC2022 64bit.As an aside, qwindowsvistastyle.dll is present and being loaded. We already encountered that problem and solved it.
-
I've just discovered that if I set my screen's DPI scaling to %100, %200, or %300, then everything looks fine and there is no jitter.
Also, if I change it to %225, then only the spinbox jitters and the radio box and checkbox are fine.
The GIF above was recorded at %150 scaling. -
Hi and welcome to devnet,
Can you try with the latest of the 6.9 series ?