Priority: P3: Somewhat important
Affects Version/s: 5.10.0
Fix Version/s: 5.12.0 Beta 1
Component/s: GUI: Window management
Environment:Observed with Qt 5.10.0 and Qt Creator 4.5.0 on both Kubuntu Linux 17.10, and Windows 10 Home, 1709 _(Build 16299.125)_
Reproduced on Linux by another Qt 5.10 user. Effect not observed by users with Qt 5.7 or Qt 5.9.3 installed.
See attached code with a QTableWidget inside a QDockWidget. If the user does any moving of the splitter for the dock widget, that positioning will be lost on any subsequent window resize.
Also, default size policy of the QTableWidget or setting it to (Expanding, Expanding) will only show one column. Overriding the sizeHint() seems the only way to get it to size to two columns.
- Dragging the splitter a bit from its starting position (could be expansion, could be contraction--doesn't matter)
- Now drag the bottom edge of the window down a bit, and snap, it jumps back to the initial size (the sudden jump occurs right when the mouse first starts dragging).
Changing the horizontal size policy from QSizePolicy::Preferred to QSizePolicy::Ignored doesn't seem to influence this behavior, not calling setStretchLastSection() doesn't seem to help either.
If the window is resized only vertically, the horizontal splitter should not move at all...and if it's resized horizontally then something more gradual should happen than a jump.
Default behavior of QTableWidget should act as with the overridden sizeHint(), or failing that, setting to (Expanding, Expanding) should do it.