QWizard (Qt 6, Windows only) - button bar layout bug?
-
My app's wizard, which worked perfectly in Qt 5 on all platforms, now has a bug in Qt 6 where its
QWizard
window is a bit too short to show the entire button bar at the bottom, but only on Windows.That gray layout rectangle now runs off the bottom of the window, leaving only a thin gray strip. (It's as if the layout engine wasn't notified when the window's final geometry was set.) However, the layout instantly corrects itself when the user drags any edge to resize the window, as the button layout jumps up into full view within the bounds of the window.
In the following photo, the left side shows the wizard window as built on Qt 5.15.2, and the right side shows the same wizard window as built on Qt 6.5.3, before the user resizes it.
Any ideas? Workarounds? As I wrote above, this bug doesn't happen on macOS.
-
Hi,
The first thing I would do is check whether 6.8.1 also shows this behaviour.
You should also provide a minimal compilable example that demonstrate it so other people can try out in the same conditions as you.
-
Thanks for the advice! I'm not able to accommodate 6.8.1 at the moment, but I was able to work around my issue by changing the code to use Modern style (i.e.,
setWizardStyle(ModernStyle);
) except on macOS, which has the side benefit of bringing back the sidebar pixmap that's suppressed by default on Windows.For the info of anyone reading, the one thing about my wizard pages that's unusual is that each page's main widget is a resizable
QScrollArea
that wraps a widget with aQVBoxLayout
. As I wrote earlier, this worked fine in Windows with 5.15.2. I see a fair bit of churn in theqwizard_win.cpp
code since then, mostly in the area of Aero/Vista tweaks, so I figure that's caused my problem, and possibly later fixed it. -
What do you mean by accommodate ?
My suggestion was mainly to test to ensure whether it was a known bug.