[Qt-qml] lines?

Juha Turunen turunen at iki.fi
Thu Sep 29 20:22:40 CEST 2011


On Thu, Sep 29, 2011 at 10:18 PM, Jason H <scorp1us at yahoo.com> wrote:
> I am trying to make a DrawArea (where you have a pen and can scribble over
> the rect) and to do this, I was planning on using onPressed and
> onPositionChanged. I need to create an array of points to store the
> scribble, and have then drawn consecutively.
>
> But I am not seeing a Line element and the PathView seems to be used for
> layout on a path, and not an actual line?
>
> How can I go about making a scribble?

Create a custom type by inheriting from QDeclarativeItem and paint the
item as you would a QWidget using QPainter.

Juha


More information about the Qt-qml mailing list