PDA

View Full Version : 3D Items ( Bug )



ashishsaryar
20th February 2008, 07:05
hi to all



QPyramidTool *pPiramidObj = new QPyramidTool( );

m_scene->addItem( qobject_cast<QGraphicsWidget *>(pPiramidObj) );

here QPyramidTool is QGlwidget.

i have made pyramid by using it .

m_scene is QGraphicsScene .

I am adding this QGLWidget to this scene .
It didn't give any error but i doesn't show.
I have to seen this pyramid on my scene how it will become possible .
Pls share your ideas.

Thanks...

jacek
20th February 2008, 13:16
Does QPyramidTool inherit QGraphicsWidget?

Stukfruit
21st February 2008, 08:52
As far as I know, you have to use QGLWidget for your QGraphicsView class, not QPyramidTool. I don't think your approach will work because QGLWidget is a completely different window, which can't be added as an item.

When you do what I proposed, you can set your projection matrix in QPyramidTool and render the 3d objects or whatever else you would like to render.