EQL5/examples/M-modules/quick/painted-item
2017-12-20 22:15:28 +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 tiny revision 2017-12-20 22:15:28 +01:00
properties.lisp unix: add "make install" option for exe, lib, modules (refactor file locations) 2017-04-28 12:05:59 +02:00
qml-lisp.lisp fix 'qml-set' to work with enum values 2017-10-10 10:59:03 +02: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.