EQL5/examples/M-modules/quick/painted-item
2017-02-21 13:32:33 +01:00
..
lib for MinGW: change "Q_OS_WIN" to "Q_CC_MSVC" (otherwise MinGW won't link plugins) 2017-02-21 10:06:50 +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 small QML revisions 2017-02-18 17:00:23 +01:00
properties.lisp revisions of "quick" examples docu 2017-02-17 10:16:30 +01:00
qml-lisp.lisp revision of "quick" examples 2017-02-12 17:06:25 +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.