EQL5/examples/M-modules/quick/painted-item
2017-03-19 00:16:31 +01:00
..
lib small revision of '.pro' files 2017-03-04 11:41:32 +01:00
qml fix erroneous QQuickPaintedItem README; add 'on..Changed: update()' handler in QML; 2017-02-21 13:32:33 +01:00
clock.lisp "quick": update "painted-item" example; tiny revisions; 2017-02-09 12:48:32 +01:00
painted-item.lisp some revisions (mostly "quick" examples) 2017-02-25 10:46:45 +01:00
properties.lisp small revisions 2017-02-28 10:32:28 +01:00
qml-lisp.lisp add QML example "table-view"; some revisions; 2017-03-19 00:16:31 +01:00
README.txt fix erroneous QQuickPaintedItem README; add 'on..Changed: update()' handler in QML; 2017-02-21 13:32:33 +01:00

INFO
====

This is an alternative to 'Canvas' in QML, using a QQuickPaintedItem,
which means using QPainter from Lisp (instead of JS in QML).


RUN
===

Run "painted-item.lisp" from this directory.


NOTES
=====

Use QQuickWidget here, because QQuickView would crash (e.g. on Windows).

Always set an "on<Property>Changed: update()" handler in QML for properties
which QML:PAINT depends on:

in QML:

    property string color: "coral"; onColorChanged: update()

Now changing the QML properties from Lisp will repaint the item:

Examples:

    (qml-set "left" "color" "transparent")
    
    (qml-set "right" "ellipse" '(40 40 20 20))


HELP
====

To display the output of QPROPERTIES*, run

    (show-properties-dialog) ; see "properties.lisp"

and use [Select] to explore the single QML items.