Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Flicker when sliding QSplitter with QGraphicsView(viewport QGLWidget)
Forum Updated to NodeBB v4.3 + New Features

Flicker when sliding QSplitter with QGraphicsView(viewport QGLWidget)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 979 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    daniel132
    wrote on last edited by
    #1

    Hello,

    I am using QGraphicsView with the viewport as QGLWidget.
    QGraphicsView and a QTreeView are added to a QSplitter.
    Sliding the QSplitter results in flickering/non-repainting/weird behaviour on the QGraphicsView.

    Adding QGLWidget without QGraphicsView to the QSplitter works as expected.

    The following code demonstrates Flickering with QGraphicsView, and no flickering without QGraphicsView when sliding the QSplitter.

    @#include <QtGui>
    #include <QGLWidget>
    #include <QtWidgets>

    int main(int argc, char **argv)
    {
    QApplication app(argc, argv);

    // Flickering occurs when sliding a QSplitter with QGraphicsView (viewport QGLWidget).
    QGraphicsView *view = new QGraphicsView();
    view->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
    view->setScene(new QGraphicsScene);
    QSplitter *graphicsViewSplitter = new QSplitter();
    graphicsViewSplitter->addWidget(new QTreeView());
    graphicsViewSplitter->addWidget(view);
    graphicsViewSplitter->show();
    
    // This works ok with a normal QGLWidget added to a QSplitter.
    QSplitter *openGlSplitter = new QSplitter();
    openGlSplitter->addWidget(new QTreeView());
    openGlSplitter->addWidget(new QGLWidget());
    openGlSplitter->show();
    
    return app.exec&#40;&#41;;
    

    }@

    Is there a fix for this?

    Thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      daniel132
      wrote on last edited by
      #2

      Bug has been fixed in 5.4
      https://bugreports.qt.io/browse/QTBUG-38327

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved