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

QQuickWidget doesn't work with Scene3D on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9
    • 5.6.0, 5.8.0, 5.9
    • Qt3D, Quick: Widget
    • None
    • OS: Windows 8.1 pro
      CPU: Intel Core i7 870
      RAM: 16GB
      VGA: NVIDIA GeForce GTX 970

    Description

      Test code:

      #include <QApplication>
      #include <QMainWindow>
      #include <QQuickWidget>
      #include <QFile>
      #include <QQuickView>
      
      int main(int argc, char *argv[])
      {
          QFile file("source.qml");
          file.open(QFile::WriteOnly | QFile::Truncate);
          file.write("\
      import QtQuick 2.0\n\
      import QtQuick.Scene3D 2.0\n\
      Scene3D { }\n\
      ");
          file.close();
      
          QApplication app(argc, argv);
      
      #define ERR_CASE 1
      
      #if ERR_CASE
          QQuickWidget *qw = new QQuickWidget;
          qw->setSource(QUrl::fromLocalFile("source.qml"));
          qw->setResizeMode(QQuickWidget::SizeRootObjectToView);
          QMainWindow mw;
          mw.setCentralWidget(qw);
          mw.show();
      #else
          QQuickView *qv = new QQuickView;
          qv->setSource(QUrl::fromLocalFile("source.qml"));
          qv->setResizeMode(QQuickView::SizeRootObjectToView);
          qv->show();
      #endif
      
          return app.exec();
      }
      

      WIth ERR_CASE = 1, the program just crashes on start-up on Windows.
      With ERR_CASE = 0, it works.

      On Linux, it runs well even with ERR_CASE = 1.
      I don't know about Mac because I don't have any.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            xylosper Byoung-young Lee
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: