mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-13 22:00:32 -08:00
"quick": add example "painted-item"; small revisions;
This commit is contained in:
parent
fcbf75464c
commit
0ff3dee53c
20 changed files with 350 additions and 15 deletions
|
|
@ -10,7 +10,8 @@ static QObject* lisp_provider(QQmlEngine*, QJSEngine*) { return lisp; }
|
|||
QObject* ini() {
|
||||
if(!lisp) {
|
||||
lisp = new Lisp;
|
||||
qmlRegisterSingletonType<Lisp>("EQL5", 1, 0, "EQL5", lisp_provider); }
|
||||
qmlRegisterSingletonType<Lisp>("EQL5", 1, 0, "EQL5", lisp_provider);
|
||||
qmlRegisterType<PaintedItem>("EQL5", 1, 0, "PaintedItem"); }
|
||||
return lisp; }
|
||||
|
||||
QVariant Lisp::apply(QObject* caller, const QString& function, const QVariantList& arguments) {
|
||||
|
|
@ -19,4 +20,9 @@ QVariant Lisp::apply(QObject* caller, const QString& function, const QVariantLis
|
|||
Q_ARG(QString, function),
|
||||
Q_ARG(QVariantList, arguments)); }
|
||||
|
||||
void PaintedItem::paint(QPainter* painter) {
|
||||
eql_fun("qml:paint",
|
||||
Q_ARG(QQuickPaintedItem*, this),
|
||||
Q_ARG(QPainter*, painter)); }
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue