[Interest] Strange layout issue

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Wed Jan 29 08:40:00 CET 2014


Dear all,

I have a strange bug with a layout. The widget is a simple form made with
QtDesigner, the top level layout is a QVBoxLayout containing 7 sub-layouts.

I added this widget manually to a custom QWidget, by reparenting it, and by
resizing it in resizeEvent to its sizeHint().

The strange thing is, that the n°2 item of the layout always gets screwed,
and the 6 others are fine. All subwidgets of item 2 are overlayed at the
top, and not taken into account by the sizeHint.

Is there something I did wrong when handling a widget with a layout? I just
called resize() and sizeHint().

For the short story, the purpose of all this is to make a vertical-only
QSCrollArea with no scroll bar, but possibility to use the mouse wheel, or
to grab the non-input parts with mouse for scrolling.

Cheers,

Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140129/aba4e040/attachment.html>


More information about the Interest mailing list