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

Crash QGraphicsView with QGLWidget as viewport

    XMLWordPrintable

Details

    Description

      Seg fault in this code:

      #include "MainWindow.h"
      #include <QApplication>
      #include <QGraphicsScene>
      #include <QGraphicsView>
      #include <QMessageBox>
      #include <QGLWidget>
      #include <QLayout>
      int main(int argc, char *argv[])
      {
      QApplication a(argc, argv);

      QGraphicsScene *scene = new QGraphicsScene();
      QGraphicsView *view = new QGraphicsView();
      view->setScene(scene);
      view->setMinimumSize(500, 500);
      view->setViewport(new QGLWidget());
      QMessageBox testWindow;
      testWindow.setWindowTitle(" Opengl standart test.");
      testWindow.addButton(QMessageBox::Cancel);
      testWindow.addButton(QMessageBox::Ok);
      testWindow.layout()->addWidget(view);
      testWindow.setText("All correct?");
      testWindow.show();

      return a.exec();
      }

      if comments view->setViewport(new QGLWidget()); then all Ok.

      Attachments

        1. qtbug31650.tar
          10 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            dancingonwater Alexey Beshenkov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes