Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.10.0
-
Linux, OpenSuSE Tumbleweed, Qt 5.10
I also tested this on OpenSuSE Leap 42.3 using Qt 5.6 and this works as expected without the additional setWindowModality.
-
-
509d566ec0f257f7f1a723096b57a718d43d5002 (qt/qtbase/5.11)
Description
I have a QWidget derived class which uses mousePressEvent and mouseMoveEvent to create a rubber band rectangle. In the mouseMoveEvent handler, when the left mouse button is pressed, it also displays a QToolTip to show the size of the rubber band rectangle.
In version 5.6, when the derived class is used as a main window or when used in a QDialog, everything works as expected. When used in 5.10, the main window one works, but the same derived class in the QDialog does not work. I have not tested versions in between.
In a QDialog, the mouseMoveEvents are received until the left mouse button is pressed. Then when trying to drag, no more move events are received and the tooltip showing the size is not updated and no rectangle is drawn.
Commenting out the QToolTip::showText call allows the display of the rubberband rectangle in the QDialog instance of the class.
I have created a minimal application that replicates this and it is stored in github.
https://github.com/SAllewell/tooltip-bug.git
I came across a Qt bug - 63846, although not the same, it suggested setting the window modality of the QDialog to Qt::WindowModal. I tried this in the constructor of the dialog and this does allow the expected functionality within the QDialog, but this was not something that was required in earlier versions.
Attachments
Issue Links
- relates to
-
QTBUG-63860 QListWidget / X11: internal move fails when parent is modal
-
- Closed
-
For Gerrit Dashboard: QTBUG-65599 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
243159,6 | Don't block mouse events if the window is a Tooltip type | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |