I am using Qlabels to plot some graphs and images (via setpixmap).
My basic layout is:
QVBoxlayout main layout via qdialog's setlayout. QHboxlayout (array of QLabels) Qlabel expandedPlot (optional expanded plot of one of the above QLabels) QLabel mainImage Main image display
Within the QDialogs re-implemented keypress event handler, I hide()/show() the expanded plot. When I hide() the expandedPlot, the layoutmanager recovers about 1/2 of the vertical usage. Then when I drag the window, the layout manager recovers the remainder of the vertical space (as if there was no item present).
How can I force the behavior of moving the window? I want the layout manager to completely recover the vertical space.
I am using Qt 5.6 on windows, but want cross-platform solutions. Thank you, mike
updateGeometry
on the hidden widget? A cut-down version of your code showing the problem would improve this question. – strubblyupdateGeometry
is a no-op in this case. TryadjustSize
on the parent. – strubbly