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

QQuickWidget distorts focus handling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.3.0
    • Quick: Other
    • None
    • Debian 7, X11

    Description

      This is a subtask of QTBUG-36935

      Take the qquickwidget example and replace the C++ part with:

      #include <QQuickWidget>
      #include <QtWidgets>
      
      class MainWindow : public QMainWindow {
          Q_OBJECT
      public:
          MainWindow()
          {
              QAction *exitAction = new QAction(tr("Exit"), this);
              QAction *aboutQtAct = new QAction(tr("About Qt"), this);
      
              connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
              connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
      
              QMenu* fileMenu = menuBar()->addMenu(tr("File"));
              fileMenu->addAction(exitAction);
      
              QMenu* helpMenu = menuBar()->addMenu(tr("About"));
              helpMenu->addAction(aboutQtAct);
          }
      };
      
      int main(int argc, char **argv)
      {
          QApplication app(argc, argv);
          QMainWindow *toplevel = new MainWindow;
      
          QUrl source("qrc:quickwidget/rotatingsquare.qml");
          QQuickWidget *w = new QQuickWidget;
          w->resize(300,300);
          w->setResizeMode(QQuickWidget::SizeRootObjectToView);
          w->setSource(source);
      
          toplevel->setCentralWidget(w);
          toplevel->show();
          return app.exec();
      }
      
      #include "main.moc"
      

      Click about 10 times in quick succession in the lower left of the window. Then click on the "about" menu. In about 50% of my attempts the first click on the menu isn't registered and I have to click again to actually open it.

      Attachments

        Issue Links

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

          Activity

            People

              tvete Paul Olav Tvete
              ulherman Ulf Hermann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes