View Full Version : Hide widget, but not change layout
dimaz
17th October 2008, 21:11
How can I hide widget without rescaling other widgets.
For example: hide() hides widget, but other widgets start changes their size (expand to hidden widget area). I don't need this. How can I make this in simple way?
Sheng
17th October 2008, 22:00
try widget.setWindowOpacity(0) instead of hide(0, but the former one might not work in some environment.
How can I hide widget without rescaling other widgets.
For example: hide() hides widget, but other widgets start changes their size (expand to hidden widget area). I don't need this. How can I make this in simple way?
osiris81
21st November 2008, 12:46
Hello, I tried it but with no success.
I tried to hide a QLabel but ui.label->setWindowOpacity(0) does nothing at all
OS: winXP
Qt: 4.4.3
Any other ideas?
aamer4yu
21st November 2008, 14:32
If its just about few widgets, you can do the following -
add the widget(s) to a Qwidget which will act as a holder for them. Now when u want to hide the widget, hide them, the widget/placeholder will still be there, and other widgets wont resize :)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.