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

NonClientArea mouse events are not received by QWidget event() function after close/show cycle

    XMLWordPrintable

Details

    • Windows
    • 38504041148f2d1cffea6520ea448dd4171adb0b

    Description

      Normally non client mouse area events like NonClientMouseAreaButtonPress, NonClientMouseAreaButtonRelease or NonClientMouseAreaMove are received by the QWidet::event() function. If a widget is closed via the window title cose button and then later showen again via the QWidget::show() function, then non client area mouse events are not received any more.

      The attached example shows this. The Show Test Widget button display a test widget that contains counters for different non client area mouse events. If the widget is hidden via the Hide Test Widget button and then shown again via the Show Test Widget button, then non client mouse events are still received. But if the Test Widget is closed via the windows close button and thn shown again via the Show Test Widget button, then non client area mouse avents are not received anymore.

      The example works without problems in Qt 5.9.2 but fails on Qt 5.11.3 and 5.12.0. So the problem has been introduced after Qt 5.9.2.

      The attached example also shows a workaround, thay may be helpfull in finding the error problem. If you uncomment the TestWidget::closeEvent() function, then you can see, that everyting works finde. The closeEvent() functon ignores the CloseEvent and simply calls hide(). So if the CloseEvent is ignored, the NonClientMouseEvents are still received

      Attachments

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

        Activity

          People

            anrocha André De La Rocha (Inactive)
            ukindler Uwe Kindler
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes