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

Popup's modal documentation is too brief

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • None
    • 5.7.0
    • None

    Description

      https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html#modal-prop says:

      This property holds whether the popup is modal. The default value is false.

      It had me questioning what a modal popup was, because I'd set it to true on a Dialog, but was still able to close it by clicking outside of it. It was only after setting closePolicy: Popup.CloseOnEscape that it behaved as expected. The expected behaviour (for me) is what widgets does:

      #include <QApplication>
      #include <QtWidgets>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          QWidget widget;
          widget.resize(400, 400);
      
          QDialog *d = new QDialog(&widget);
          d->setModal(true);
      
          widget.show();
      
          d->exec();
      
          return app.exec();
      }
      

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes