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

Regression: QGLWidget : Slow response with QSplitter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.0.0 RC 1
    • 5.0.0 Beta 1
    • GUI: OpenGL, Other
    • None
    • Fedora 17 64 bit.
    • 4334e0fcc60497da73671063deb68fb1661f864c

    Description

      Tested on Fedora 17 with Qt5 Beta (latest from git). Slow response when dragging the splitter (compiled against both Qt5 and Qt4 and comparing the two with Qt5 is significantly slower).

          #include <QApplication>
          #include <QGLWidget>
          #include <QMainWindow>
          #include <QSplitter>
          #include <QTextEdit>
           
          class GLWidget : public QGLWidget
          {
          public:
          GLWidget(QWidget *parent = 0) : QGLWidget(parent) {}
          GLWidget(const QGLFormat &format, QWidget *parent = 0, const QGLWidget *shareWidget = 0, Qt::WindowFlags f = 0) :
          QGLWidget(format, parent, shareWidget, f){}
           
          protected:
          virtual void paintGL();
          virtual void resizeGL(int, int) { }
          };
           
          void GLWidget :: paintGL()
          {
           
          glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
          glLoadIdentity();
           
          glTranslatef(0.5f,0.5f,0.0f);
           
          glBegin(GL_QUADS);
          glVertex3f(-1.0f, 1.0f, 0.0f);
          glVertex3f( 1.0f, 1.0f, 0.0f);
          glVertex3f( 1.0f,-1.0f, 0.0f);
          glVertex3f(-1.0f,-1.0f, 0.0f);
          glEnd();
          }
           
          int main(int argc, char **argv)
          {
          QApplication app(argc, argv);
           
          QMainWindow mainwindow;
           
          mainwindow.setFixedSize(1000,600);
           
          QSplitter *splitter = new QSplitter(Qt::Horizontal);
          splitter->addWidget(new QTextEdit());
          splitter->addWidget(new GLWidget());
           
          mainwindow.setCentralWidget(splitter);
           
          mainwindow.show();
           
          return app.exec();
          }
      

      Attachments

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

        Activity

          People

            rodal Samuel Rødal
            faizol Faizol Abd. Halim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes