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

Window resizing and movement stops working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.7.1, 5.2.0
    • Core: Event loop
    • Windows 7 and Windows XP

    Description

      Follow these steps to reproduce the problem:

      1.Run the example below and launch the widget

      2. Launch the dialog

      3. Click on the widget and keeping resizing it. Do not release the mouse (mouse down) until the dialog box shows up.

      4. Once the dialog box shows up, it is not poossible to resize (or move) the dialog box or the widget.

      5. However, on step 3, if the mouse is released before the dialog box shows up, then it is possible to resize both the dialog box and the widget.

      Note: This is a regression from Qt 4.3.x. When not releasing the mouse there,the dialog will not shows up until the mouse is released.

      #include <QtGui>
      
      class MainWindow : public QMainWindow
      {
      Q_OBJECT
      public:
      MainWindow()
      {
      QMenu *menu = menuBar()->addMenu("Test menu");
      QAction *firstAction = new QAction(this);
      QAction *secondAction = new QAction(this);
      
      menu->addAction(firstAction);
      menu->addAction(secondAction);
      
      firstAction->setText("Launch widget");
      secondAction->setText("Launch dialog");
      
      connect(firstAction, SIGNAL(triggered(bool)), this, SLOT(test1()));
      connect(secondAction, SIGNAL(triggered(bool)), this, SLOT(test2()));
      }
      public slots:
      void test1()
      {
      QWidget *wid = new QWidget();
      wid->resize(200,200);
      wid->show();
      }
      
      void test2()
      {
      QTimer::singleShot(10000, this, SLOT(test3()));
      }
      void test3()
      {
      QDialog *dialog = new QDialog(this);
      dialog->setWindowMoXXXXty(Qt::WindowModal);
      dialog->exec();
      }
      };
      
      #include "main.moc"
      
      int main(int argc, char** argv)
      {
      QApplication app(argc, argv);
      MainWindow window;
      window.show();
      return app.exec();
      
      }

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            naevdal Sigrid Fjell Nævdal (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes