[Qt-interest] [ Making a Widget scrollable ]
Zeljko
zeljko at holobit.net
Wed Feb 1 07:51:34 CET 2012
ashish raste wrote:
> Hi all,
>
> I am having a painting Widget in which we can draw with the mouse events,
> similar to the Scribble application in the Examples of Qt.
>
> Am trying to make the widget scrollable i.e when we finish painting on the
> current page, we can kinetically scroll onto the next page and should also
> be able to look at the previous page(s) when needed.
>
> Have tried to subclass my widget from QWidget and QScrollArea so that I can
> set those properties needed for scrolling, but in vain.
>
> As the scribbleArea(widget to paint) doesn't have such kinetic scroll
> properties, can anyone tell me how to implement it?
What exactly did you paint ? If you use QAbstractScrollArea/QScrollArea you must
paint on it's viewport.
zeljko
More information about the Qt-interest-old
mailing list