[Qt-interest] scrollbar in QGraphicsView
Martin Hofius
Martin at hofius-online.com
Thu Apr 8 09:30:45 CEST 2010
Hi,
Am Donnerstag, 8. April 2010 schrieb Yifei Li:
> Hi all,
>
> First of all, my question is under what condition a QGraphicsView widget
> will show horizontal/vertical scroll bar.
>
> I know the default behavior is to show scroll bars as needed, but the code
> below does not give me scrollbars. However, if I use QGraphicsView instead
> of my custom QGraphicsView class, scroll bars showed up properly.
>
> // MyView is derived from QGraphicsView and it reimplements resizeEvent.
> // QGraphicsView* view = new QGraphicsView, scroll bars will be displayed
do you forward the resize event to the original handler? How should the
original resize handler know that showing scrollbars is needed if you catch
the resize event?
Martin
More information about the Qt-interest-old
mailing list