[Qt-interest] Widget content not showing with parent

Girish Ramakrishnan girish at forwardbias.in
Sat Oct 24 17:41:52 CEST 2009


Eirik Ulvik wrote:
> Does anyone have a clue why the contents of a widget is shown when i do:
> widget->setParent(0); widget->show(). But not if the widget has a
> parent. I have this situation and am really puzzled. What might be the
> problem. The widget in question shows open gl content that is integrated
> with the Coin3D scene graph and SoQt.
> 


A widget with parent 0 is a top level. If you call show() on it, it
becomes visible.

A widget with a parent is visible IFF the parent is visible. Calling
show() and hide() on this widget only affects visibility if the parent
was visible to stat with.

Girish



More information about the Qt-interest-old mailing list