graphicsview
-
In qtcreator I created a MainWindow, within that on the left, is Widget X and on the right is a graphicsview widget called graphicsview.
I have not called a setCentralWidget I think qtcreator has already done that for me.
since I have a lot of the functionality already working.I have what must be a simple problem with getting the graphicsview to work.
in my MainWindow init I do
// ...other MainWindow init code that works
ui->setupUi(this);
scene = new QGraphicsScene();
ui->graphicsView->setScene(scene);
ellipseItem = scene->addEllipse( 10,10,100,100, QPen(Qt::blue), QBrush(Qt::blue) );This all compiles and runs but nothing appears in the graphicsview.
I then tried adding a setCentralWidget( ui->graphicsView ). This creates an exception in the debugger
stopped at functionality for the other widget to the left of the graphicsview.Any ideas?