Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65599

[regression] Showing QToolTip blocks mouseMoveEvent signals to widget in QDialog

    XMLWordPrintable

Details

    • Linux/X11
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              andysh Andy Shaw
              s_allewell Steve Allewell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes