I want to make the "Application 1" disappear when the "Single" button is clicked. And show it again i mean both when "Split" button is clicked. Is there any method to make disappear/collapse a widget from QSplitter().
Here's the basic layout :
Thanks in advance.
QWidget
has functionsshow()
andhide()
, if Application1 is insideQWidget
or any other widget inheritingQWidget
, you can callhide
on the object of that widget when user clicks onSingle
button, (widget.hide()
). When user clicks onSplit
button you can callshow()
on the same object to show the widget.Edit
Another way of achieving this would be:
to set the size of
QSplitter
. WhenSingle
Button is pressed, do the following:When
split
button is pressed do the following:Assuming that the
self
refer to mainWindow containing the splitter andself.width()
gives the width of mainWindow.