[vlc-devel] QDockWidget and resizing.
Andrew Medico
a.medico at gmail.com
Tue Dec 18 03:36:12 CET 2007
On Dec 16, 2007 3:09 PM, Benjamin Sergeant <bsergean at gmail.com> wrote:
> Just trying to guess:
>
> What you could try: overwrite resizeEvent and tell it to don't resize
> horizontally.
> http://doc.trolltech.com/4.3/qwidget.html#resizeEvent
>From the documentation:
"When resizeEvent() is called, the widget already has its new geometry."
Overriding QWidget::resizeEvent() to prevent resizing won't work,
because, per above, the widget has already been resized when the
resize event comes in. So resizing a top-level widget would likely
result in the appearance of the widget "jumping" between
mouse-selected size and the forced size - not pretty. At best, the
widget will look wrong (if the widget is in a layout, the layout will
expect the widget to respect setGeometry calls), at worst it will
crash (stack overflow observed on Windows with the attached simple
test).
--
Andrew Medico <a.medico at gmail.com>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20071217/5a48d369/attachment.ksh>
More information about the vlc-devel
mailing list