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

QMainwindow accepts drop events even when a modal dialog is open

    XMLWordPrintable

Details

    • f58656a963fb80bae61b202bca404d033bca30ef (qtbase/5.9, 11.12.2017, 5.9.4)

    Description

      Even when the QMainWindow is blocked by a modal dialog, the window is accepting the drop events performed.

      I have made a small application to demonstrate the same. In the application, the main window is set to accept all drop events and as soon as we drop something, it prints "Item Dropped" in the application output. When the push-button at the center is clicked the main window will be blocked by a modal dialog. But even then if the user drags and drops something in the main window the window is accepting the drop events and the text is getting printed.

      Isn't it against the principle of modal dialog: "A modal widget prevents widgets in other windows from getting input."

      Attachments

        1. Application.cpp
          1 kB
        2. qtbug46287.zip
          1 kB
        3. Qt Creator Info.png
          Qt Creator Info.png
          130 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-46287
          # Subject Branch Project Status CR V

          Activity

            People

              andysh Andy Shaw
              Sajas01 Sajas K K
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes