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

Mouse needs to be automatically grabbed when mouse button is pressed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0 RC 1
    • 5.0.0 RC 1
    • GUI: Window management
    • None
    • Windows (maybe Mac?)
    • 1ea00124f77df1753b3d881810bbed181bbc6fc6

    Description

      QWidget::grabMouse() documentation states: "It is almost never necessary to grab the mouse when using Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when a mouse button is pressed and keeps it until the last button is released." Apparently this is default behavior in X11, but for Windows it needs to be explicitly implemented. Mac needs to be verified, may be necessary to implemente there, too.

      Attached a test application to test various grab-related issues.

      Original attempt at solving this was reverted as it broke linux platforms (https://codereview.qt-project.org/#change,34173).

      Attachments

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              e0348803 Miikka Heikkinen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes