QSplitter disappears once child widget is hidden.
-
I have a QSplitter that sepparates two child widgets (lets say "A" and "B").
When I call "B->hide();" - my QSplitter disappears.Is there any way to make QSplitter (and it's QSplitterHandle) still visible while one of child widgets is hidden?
Thanks.
-
Hi,
You can use QSplitter::setSizes for that
-
Thanks SGaist,
yes, this solution works, it's just that childs still think they are visible
(i.e. "B->isVisible();" allways returns with "true")@QList<int> sizes;
sizes.append(300); // Child A
sizes.append(0); // Child B (hide it)mUI.splitter->setSizes(sizes);@
-
You're welcome !
Indeed, collapsed doesn't necessarily mean invisible however you should be able to deduct this from the widget size