[Qt-interest] Unable to hide widget
Malyushytsky, Alex
alex at wai.com
Mon Nov 1 23:42:37 CET 2010
If you want to hide visible widget which is not window or dialog and normally is in the layout,
You should call setVisible().
If it does not work, check that you find correct "myWidget" - you might have a few widgets with the same name.
Regards,
Alex
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Alex Ivasyuv
Sent: Sunday, October 31, 2010 4:05 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Unable to hide widget
Hi,
I'm trying to hide one of widget in other another one, that was loaded from .ui, but it doesn't work.
// widget - loaded widget from .ui
QWidget * layerWidget = widget -> findChild<QWidget *> ("myWidget");
layerWidget -> hide(); // doesn't work
setVisible() also doesn't work.
I also tried update() and repaint() after that, but they also don't have any effect.
What's wrong?
Thanks,
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list