I have a QGroupBox
. Depending on the context, it's title may be redundent (displayed in another place of the GUI), so I then need to make as if the QGroupBox
was not here....but I must preserve it's content visible (so I don't want to call QGroupBox::hide()
)!
I need to do this dynamically at runtime and would like to avoid creating/destroying the QGroupBox
+ reparenting it's content....there must be an easier way to do this.
What I tried so far:
QGroupBox
visible:
QGroupBox::setTitle("")
removes the text. QGroupBox::setFlat(true)
makes the frame be a single line.I end up with this:
Not too bad...but a line remains....is there a way to completely hide the QGroupBox
frame but preserve it's content visible?
My option:
QGroupBox theBox;
theBox.setFlat(true);
theBox.setStyleSheet("border:0;");