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

Windows/Vista style: Scrollbar disappears from QComboBox embedded into QGraphicsView when using QGLWidget as viewport

    XMLWordPrintable

Details

    • 3c20b9b97377172dd1fc384bd28d3c7dbff0f523 (qt/qtbase/5.15)

    Description

      The scrollbar disappears from the QComboBox if QGLWidget is used. Sample below and project will be attached.

      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QGraphicsView graphics_view;
          graphics_view.setFrameStyle(0);
          graphics_view.setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
          graphics_view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
      
          QGraphicsScene *scene = new QGraphicsScene;
          graphics_view.setScene(scene);
      
          QWidget window;
          QGraphicsProxyWidget* proxy = graphics_view.scene()->addWidget(&window);
          proxy->setPos(0, 0);
          proxy->setCacheMode(QGraphicsItem::NoCache);
      
          QComboBox* combo = new QComboBox(&window);
          for (int i = 0; i < 20; ++i)
          {
              combo->addItem(QString::number(i));
          }
      
          QHBoxLayout* layout = new QHBoxLayout(&window);
          layout->addWidget(combo);
          window.setLayout(layout);
      
          graphics_view.show();
      
          return app.exec();
      }
      

      Attachments

        1. qtbug63687_diag.diff
          6 kB
        2. qtbug63687.png
          qtbug63687.png
          4 kB
        3. qtbug63687.zip
          2 kB
        4. qtbug63687.zip
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            misalmel Mika Salmela
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change