PDA

View Full Version : minimize child widget



sreedhar
14th May 2006, 19:29
hi,
I have a child widget for QTextEdit. I set the window flag setWindowFlags(Qt::ToolTip);

If i minimize the parent widget the child widget is not minimized, and stays on the screen at same position.

Please reply me how to minimize the child widget on minimizing the parent widget.

regards,
sree

jacek
14th May 2006, 20:08
If you have set the Qt::ToolTip flag, then these widgets are not child widgets, but separate windows --- you must minimize them by hand.

georgie
15th May 2006, 05:41
can't you connect a signal to the child's QWidget::showMinimized() slot? have the parent emit some signal when it minimizes so that the child widget (even if it is a separate window) knows when to minimize....

sreedhar
15th May 2006, 10:13
hi,
Thanks a lot for the reply.

To place a widget on top of another widget, i set the setWindowFlags(Qt::ToolTip);

If this is not the way how can i place a widget on top of anpther so that the top window is a child of below window and the child window should be frame less (with no minimize, maximize etc buttons).

Please post any code if possible.

Thank you

regards,
sreed

jacek
15th May 2006, 12:04
If this is not the way how can i place a widget on top of anpther so that the top window is a child of below window and the child window should be frame less (with no minimize, maximize etc buttons).
So you want two separate windows one over another or two widgets in a single window?

sreedhar
15th May 2006, 13:02
thanks a lot,
if we set the setWindowFlags(Qt::SubWindow); for the child widget its working as expected

regards,
sreedhar