PDA

View Full Version : Graphics framework + Qt3D problem



RenderMan
18th February 2010, 20:26
Hi Everybody,

I'm trying to use QGLGraphicsViewportItem (Qt3D) with other graphics scene elements like QGraphicsText in the same scene. However, whenever I add the QGLGraphicsViewportItem, the text elements disappear.

The easiest way to reproduce this is to insert the following lines into qt3d/examples/graphicsview/main.cpp, line 78 (after the QGLGraphicsViewportItems are inserted) :



QGraphicsTextItem *text = new QGraphicsTextItem("This text will not show up");
text->setDefaultTextColor(Qt::red);
text->setPos(-20,-20);
text->setZValue(2);
scene.addItem(text);


Here, I am adding a text element into the scene which contains 2 QGLGraphicsViewportItems. The text will not show up. If you comment the graphics viewports out, then the text will display correctly.

Does anybody have an idea?

Thank you,