PDA

View Full Version : QGraphicsView doesn't paints child widgets



ABBAPOH
13th July 2011, 21:18
I have "complex" widget added to scene via QGRaphicsProxyWidget. This widget consists of two other widgets layed in layout. My problem that child widgets are not shown. According to event filter, they don't receive PaintEvent (but they receive show/hide and move events).
Any ideas? Thanks.

high_flyer
14th July 2011, 12:05
Are these child widgets custom widgets?

ABBAPOH
14th July 2011, 15:27
one is custom, other is usual QSilder. None is shown.
In fact, this proxy is child of own class which inherits QGItem and implements paint event. When widget is added on scene without any parents, everything ok

high_flyer
14th July 2011, 17:04
What happens if you put the two children in a normal QWidget? do they show then?

ABBAPOH
14th July 2011, 17:21
of course.
by the way, bug still not reproduces on empty scene, with same parameters, and with my custom parent.
i really hate to modify alien code:(

high_flyer
14th July 2011, 17:32
ha? of course? you mean it shows?
Does you parent re implement paintEvent()?
If so, can you post the code?

ABBAPOH
14th July 2011, 22:32
Well, in fact it seems that problem is that architecture of items is too complex (a lot of subchildren and all this hierarchy is laid on item with opengl wigdet). Some parts of this structure used alone seems working:(
My parent item just draws background and being used alone it shows my proxy and my complex widget with it's children.

high_flyer
15th July 2011, 08:47
Well, you are providing too little information to allow helping you in any efficient way.
Using QGLWidget is an important piece of information, which only now you mentioned in parenthesis.
That alone could explain the problem you are talking about.
It seems you are reluctant to explain in more detail...
That is ok, but makes it very hard to help you.