[Qt-interest] scrollbar in QGraphicsView
Yifei Li
yifli at mtu.edu
Thu Apr 8 21:56:54 CEST 2010
Martin,
Thank you for the reply.
In MyView::resizeEvent, I did call QGraphicsView::resizeEvent
Yifei
----- Original Message -----
From: "Martin Hofius" <Martin at hofius-online.com>
To: qt-interest at trolltech.com
Sent: Thursday, April 8, 2010 3:30:45 AM GMT -05:00 US/Canada Eastern
Subject: Re: [Qt-interest] scrollbar in QGraphicsView
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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list