Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
4.6.3
-
None
-
Windows Vista 32 bits, Visual Studio 2008 SP1, Qt 4.6.3 + VS Addin 1.1.5, Ogre 1.6.5
Description
Hello,
I made an application using Ogre3D (http://www.ogre3d.org/) and Qt. But I had some problems.
When we create a QWidget to render a Ogre3D Scene (by deriving a OgreWidget from QWidget), it works. But when we set this OgreWidget to a QMdiSubWindow and add the QMdiSubWindow to a QMdiArea, there is a problem. The widget doesn't want to let Ogre do a render.
I think the problem comes from the render method of the QMdiSubWindow when it is added to the QMdiArea.
You can see a french tutorial (with source code) at this link : http://irmatden.developpez.com/tutoriels/qt/integration-ogre-qt/
I used this tutorial to create my application.
I tried to derive the OgreWidget directly from QMdiSubWindow, this QMdiSubWindow can be displayed, but when we add this QMdiSubWindow to a QMdiArea, it's the same problem.
I attached the source code of this last test. Normally we should set the Qt::WA_PaintOnScreen flag on the QMdiSubWindow for doing a Ogre render, but this flag take the QMdiSubWindow entirely transparent in the QMdiArea.
To test the integration (or not) of the Widget in the QMdiArea, you can :
- go to the implementation of the fonction OgreMainWindow::createOgreWidget
- comment (or not) the line : mdiArea->addSubWindow( (QMdiSubWindow*)og );
The test the flag Qt::WA_PaintOnScreen flag, go in the contructor of the OgreWidget and uncomment this line : //setAttribute(Qt::WA_PaintOnScreen);
there are screenshots (from different tests) of this problem at this adress : http://ant.lafarge.free.fr/FTP/index.php?url=./Projects/QtOgre/
thanks,
Antoine Lafarge