Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.9.6, 5.10.1, 5.11.1
-
Windows 7, Windows 10, macOS 10.13
Description
Never changes layout QMainWindow when resizing window by mouse if QDockWidget is changed floating.
Reproducible step:
- Drag green title bar on QDockWidget to float, and drop outside QMainWindow.
- Resize QMainWindow by mouse.
- The layout won’t be changed by step 2. (not change central Listbox size)
That is observed with Qt 5.9.3 and later version even 5.11.1 on Windows 7 but that doesn’t see with Qt 5.6.1-1. Please see Qt5.9.3.png and Qt5.6.1-1.png in attachment what happened.
Question is, how can get fixing to be same behavior with Qt 5.6.1-1 that means to get changing layout even using QWidget::setMouseTracking(true) for title bar because that is suspected that setMouseTracking(true) is one cause of reason.
And that could be seen to reproduce on Windows 10 environment. Then I suggested them to add “virtual void mouseMoveEvent(QMouseEvent *event) { event->ignore(); }” in inherited QWidget class for title bar for just passing through mouse moving event. Because I have never seen the problem with Qt 5.9.3 after adding that event->ignore() on Windows 10. However, the problem still causes on Windows 7 and macOS.
Also, important thing is that reproducible rate is not 100%. Please try several times if you try to reproduce.
QTBUG-70239.zip is original one without calling event->ignore(), and QTBUG-70239-add-event-ignore.zip is my mentioned in attachment.
Attachments
Issue Links
- relates to
-
QTBUG-70769 QMainWindow central widget not resizing properly after restoreState
-
- Reported
-