Details
-
Bug
-
Status: Reported
-
P4: Low
-
Resolution: Unresolved
-
4.8.7, 5.6.1
-
None
-
None
-
Windows: reproduced
Linux/awesome: reproduced
OS X: reproduced
$ uname -a
Linux rainbowdash 4.4.6-gentoo #1 SMP Tue Apr 26 21:06:28 CEST 2016 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux
$ gcc --version
gcc (Gentoo 4.9.3 p1.5, pie-0.6.4) 4.9.3
$ awesome --version
awesome v3.5.6 (For Those About To Rock)
• Build: Feb 3 2016 16:08:40 for x86_64 by gcc version 4.9.3 (@rainbowdash)
• Compiled agayst Lua 5.1.5 (running with Lua 5.1)
• D-Bus support: ✔Windows: reproduced Linux/awesome: reproduced OS X: reproduced $ uname -a Linux rainbowdash 4.4.6-gentoo #1 SMP Tue Apr 26 21:06:28 CEST 2016 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux $ gcc --version gcc (Gentoo 4.9.3 p1.5, pie-0.6.4) 4.9.3 $ awesome --version awesome v3.5.6 (For Those About To Rock) • Build: Feb 3 2016 16:08:40 for x86_64 by gcc version 4.9.3 (@rainbowdash) • Compiled agayst Lua 5.1.5 (running with Lua 5.1) • D-Bus support: ✔
Description
When adding widgets to a layout "later on" (so not in the constructor), the minimum size hint of these widgets is ignored. It is possible to shrink the window much further than should be possible.
1. Create a QWidget, give it a layout. Connect QTimer::singleShot to a method that will add widgets to the layout. Resize the window as small as possible.
2. I expected the window to stop getting smaller once the minimum size of the contained widgets is reached.
3. The window keeps getting smaller.
I have verified that this issue exists on Linux, Mac, and Windows.
Code to reproduce the issue:
http://www.qtcentre.org/threads/66606-Minimum-size-hint-ignored-when-adding-widgets-dynamically
The code + project is also attached.