PDA

View Full Version : QGraphicsView



Maluko_Da_Tola
20th July 2010, 19:52
Hi,

I am trying to set a GraphicsView widget that i created in my mainwindow to display a graphics scene that i previously created. I used the following code:

QGraphicsView view(&scene);
QGraphicsView* widget = new QGraphicsView();
view.setViewport(widget);
view.show();

Any suggestions on how this could work?

Thank you

Lykurg
20th July 2010, 19:56
Any suggestions on how this could work?Yes, it will work if you rewrite it completely! And also a basic knowledge of C++ could help.
And why you don't look in the Qt docs, there are many examples and howto's!