PDA

View Full Version : QGraphicsView dont refresh



ProTonS
10th September 2009, 21:26
Hello guys.

I created a QGraphicsView class and put a scene inside it to add itens.

I am using QtDesigner to develop my interface, it has already a QGraphicView and I would like to replace that to my new class QGraphicsView. I just do it:


ui.graphicsView = new my_graph(vector, vector2);

I cant see anything, but if I do a ui.graphicsView->show(); I can see it in a new windows. I would like to see it in my original window inside my interface that I developed with qtdesigner.

Can Someone give me a hint?

Thanks in advanced.

Jorge.

wysota
10th September 2009, 22:24
Using Custom Widgets with Qt Designer

ProTonS
11th September 2009, 15:05
Hello, wysota. Thanks for your post.

Well, I just change my class from QGraphicsView to QGraphicsScene. After that I use new inside the setScene method.

It´s working now :D

bye bye.