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

QQuickWindow::frameSwapped() never emitted with QQuickWidget::quickWindow()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.6.1, 6.7.0 Beta2, 6.8
    • Quick: SceneGraph
    • None
    • Windows

    Description

      QQuickWidget's internal QQuickWindow object never emits QQuickWindow::frameSwapped() signal.

      Here's a code to compare:

      #include <QtQuickWidgets>
      
      int main(int argc, char **argv) {
          QApplication app{argc, argv};
      
          QQuickWidget w;
          w.setSource(QUrl{"qrc:/App/Main.qml"});
          w.resize(512, 512);
          w.show();
      
          QQuickView v;
          v.setSource(QUrl{"qrc:/App/Main.qml"});
          v.resize(512, 512);
          v.show();
      
          QObject::connect(w.quickWindow(), &QQuickWindow::frameSwapped, [] {
              qDebug() << "frameSwapped() from QQuickWidget::quickWindow()";
          });
          QObject::connect(&v, &QQuickWindow::frameSwapped, [] {
              qDebug() << "frameSwapped() from QQuickView";
          });
          return app.exec();
      }
      

      Main.qml is just BusyIndicator for continuous updating:

      import QtQuick.Controls.Material
      BusyIndicator {}
      

      Result:

      18:41:59: Starting D:\downloads\build-untitled19-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug\appuntitled19.exe...
      QML debugging is enabled. Only use this in a safe environment.
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      frameSwapped() from QQuickView
      18:42:01: The process was ended forcefully.
      

      Attachments

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

        Activity

          People

            janichol Andy Nichols
            bylee Byoung-young Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes