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

QSpinBox doesn't receive MouseButtonRelease event when using native widgets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.10
    • None
    • macOS

    Description

      Setting the Qt::WA_NativeWindow attribute can sometimes prevent QSpinBoxes from receiving mouse release events, which causes the spinbox to continue spinning indefinitely.

      I've attached a simple example application with a dialog containing a QSpinBox within a container widget. I believe this sort of nesting is required to reproduce the bug.

      This has something to do with the focus frame on the spinbox, it's possible to prevent eternal spinning by setting Qt::WA_MacShowFocusRect to false on the spinbox, or by setting the application attribute Qt::AA_DontCreateNativeWidgetSiblings to true.

      Attachments

        1. dialog.cpp
          1 kB
          Jessica Leigh
        2. dialog.h
          0.3 kB
          Jessica Leigh
        3. main.cpp
          0.2 kB
          Jessica Leigh
        4. mainWindow.cpp
          0.6 kB
          Jessica Leigh
        5. mainWindow.h
          0.1 kB
          Jessica Leigh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jleigh Jessica Leigh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes