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

QSplitter not being drawn properly in QGraphicsScene

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.2
    • Widgets: GraphicsView
    • None
    • 5f9cf976110a0847053f1104376ad8831f9ceb48

    Description

      Main App
      #include <QApplication>
      #include <QUiLoader>
      #include <QFile>
      #include <QWidget>
      #include <QGraphicsView>
      #include <QGraphicsScene>
      
      int main(int argc, char ** argv)
      {
          QApplication app(argc,argv);
      	
          QUiLoader loader;
          QFile mainWindowFile("mainwindow.ui");
          mainWindowFile.open(QFile::ReadOnly);
          QWidget *mw = loader.load(&mainWindowFile,0);
          mainWindowFile.close();
      	
          QFile frameFile("DigitsDisplay.ui");
          frameFile.open(QFile::ReadOnly);
          QWidget *f = loader.load(&frameFile,0);
          frameFile.close();
      
          if(mw && f)
          {
              QGraphicsScene * scene = new QGraphicsScene();
              QGraphicsView *view = mw->findChild<QGraphicsView *>("graphicsView");
              if(view)
              {
                  view->setScene(scene);
                  scene->addWidget(f);
              }
              mw->show();
          }
          return app.exec();
      }
      

      The splitter in between the 2 text labels doesn't draw in the correct location in the scene.

      Attachments

        1. mainwindow.ui
          1 kB
        2. DigitsDisplay.ui
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            steno Jon Mullen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes