[Qt-interest] QMdiArea and adding a subwindow

Sajjad dosto.walla at gmail.com
Fri Apr 29 08:37:18 CEST 2011


Hello Forum,


I have a instantiated an QMdiArea and i also have an widget - subclass of
QGraphicsView

which has been added as a subwindow of the mdi area. The mdi area object is
set as a central widget in the main window. I want to have the QGraphicsView
object maximized when the main window is loaded. I am trying to achieve it
as follows:


///////////////////////////////////////////////////////////////////////////////////////


   1. Editor = new NemoEditor(this,NULL,NULL);
   2. Editor->setWindowTitle(tr("Scene Hierarchy"));
   3.
   4. Editor->setWindowState(Editor->windowState() | Qt::WindowFullScreen);
   5.
   6. m_mdiArea->addSubWindow(m_h3dSceneEditor);
   7.
   8. //!add the scene editor to the MDI area
   9. m_mdiArea->addSubWindow(Editor


////////////////////////////////////////////////////////////////////////////////////////


Is there anything missing from above since i do not get the subwindow
maximized.

By the way i am initializing the mdi area as follows:


////////////////////////////////////////////////////////////////////////////////////////////


   1. m_mdiArea = new QMdiArea(this);
   2. m_mdiArea->setOption(QMdiArea::DontMaximizeSubWindowOnActivation,false
   );
   3.
   4. //!set the mdi area as the central widget
   5. //!and this is how it is used in the main window
   6. setCentralWidget(m_mdiArea);



////////////////////////////////////////////////////////////////////////////////////////////


Any hint would be very helpful.


Thanks
Sajjad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110429/cc3fb810/attachment.html 


More information about the Qt-interest-old mailing list