Hi,
I have a MDI application. I have created a QGraphicsScene / QGraphicsView. I was wondering how I could put this into my QMdiSubWindow. I did do the following, but this doesn't seem correct as the scenes background isn't blue and the paint event is not being called on the graphics item?
CanScene canScene;
QMdiSubWindow* subWindow = m_pworkspace->addSubWindow( &view );
subWindow
->setWindowIcon
(QIcon(QString::fromUtf8(":/QTCanMonitor/Resources/Winamp.png")));
subWindow->setMinimumSize( 200, 200 );
canScene.setBackgroundBrush(Qt::blue);
view.resize(500,500);
view.scale(0.95,0.95);
view.show();
CanScene canScene;
QGraphicsView view(&canScene);
QMdiSubWindow* subWindow = m_pworkspace->addSubWindow( &view );
subWindow->setWindowIcon(QIcon(QString::fromUtf8(":/QTCanMonitor/Resources/Winamp.png")));
subWindow->setMinimumSize( 200, 200 );
canScene.setBackgroundBrush(Qt::blue);
view.resize(500,500);
view.scale(0.95,0.95);
view.show();
To copy to clipboard, switch view to plain text mode
Regards,
Steve
Bookmarks