Ah, I think I got an idea from the docs. Apparently, one cannot modify the layout of a widget after it has been set as a QScrollArea content. Damned... this prevents me from dynamically changing the content of the dock without recreating everything at each update
Etienne void QScrollArea::setWidget ( QWidget<qthelp://com.trolltech.qt.481/qdoc/qwidget.html> * *widget* ) Sets the scroll area's *widget*. The *widget* becomes a child of the scroll area, and will be destroyed when the scroll area is deleted or when a new widget is set. The widget's autoFillBackground<qthelp://com.trolltech.qt.481/qdoc/qwidget.html#autoFillBackground-prop> property will be set to true. If the scroll area is visible when the *widget* is added, you must show()<qthelp://com.trolltech.qt.481/qdoc/qwidget.html#show> it explicitly. Note that You must add the layout of *widget* before you call this function; if you add it later, the *widget* will not be visible - regardless of when you show()<qthelp://com.trolltech.qt.481/qdoc/qwidget.html#show> the scroll area. In this case, you can also notshow()<qthelp://com.trolltech.qt.481/qdoc/qwidget.html#show> the *widget* later. *See also *widget<qthelp://com.trolltech.qt.481/qdoc/qscrollarea.html#widget> (). 2013/3/19 Etienne Sandré-Chardonnal <etienne.san...@m4x.org> > Tried, with no success. > > Surprisingly, if I directly set my QWidget as the QDockWidget content, it > works. > But if I put a QScrollArea as the QDockWidget content, and my QWidget as > QScrollArea content, it does not work. > > Something is wrong with the QScrollArea > > Etienne > > > 2013/3/19 preeteesh kakkar <preeteesh.kak...@gmail.com> > >> Try calling gridlayout->update() and see if that helps? >> >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest