Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
None
-
None
-
a74cdf778c (qt/qtbase/dev) a74cdf778c (qt/tqtc-qtbase/dev)
Description
QFormLayout allows a row consisting of a label and an editing widget to be added at the same time. There are instances where it would be convenient to be able to hide both the label and widget at the same time.
It would be good to be able to do it by row number: hideRow( int row )
or by the "field" widget: hideRow( QWidget field)
Currently this can be done like this (assuming fld is the field widget and lay is the layout)
fld.hide()
lay.labelForField(fld).hide()
One disadvantage of the above is that while the items in the row are hidden the spacing above and below the row remains, that is, the rows above and below the hidden row appear further spread apart than the rest of the items in the layout.
A convenience method to hide the items and remove the spacing would be helpful.
Thanks.