[Qt-interest] Qt-interest Digest, Vol 15, Issue 1
ashish raste
rasteashish at gmail.com
Wed Feb 1 12:36:54 CET 2012
> > 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.
>
>
Hi Zelijko,
I tried scribbling on the widget(ScribbleArea, available in the examples of
Qt 4.8), then I set it to a scrollArea using
scrollArea->setWidget(scribbleArea) and now am trying to implement kinetic
scrolling on this scrollArea.
But as you may know, when you drag the mouse vertically in bottom-top or
top-buttom direction, the scribbleArea will receive the mouse-events first,
and it will paint on the widget where it should actually scroll the image
in the needed direction.
Should I paint on the viewport of the ScrollArea without using that
scribbleArea widget?
I hope you understood my problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20120201/0c90014d/attachment.html
More information about the Qt-interest-old
mailing list