New: embedding in Qt/C++ projects

22 views
Skip to first unread message

Polos Ruetz

unread,
Feb 23, 2011, 4:18:18 PM2/23/11
to eql-user
If you're interested in embedding EQL in existing Qt/C++ applications,
please see the example Qt_EQL in the sources.
What's possible?

- statically link any Qt/C++ project to EQL

- get C++ object pointers from Lisp (identified by QObject::objectName):

(qfind-child *qt-main* "myName")

- call any C++ method from Lisp (after declaring them Q_INVOKABLE in C++):

(qfun* *qt-main* :qt "myFunction")

- call any Lisp function from Qt/C++:

QVariant ret = // optional (return value)
eql_qfun("my-package:my-function",
QVariant::String, // optional (return type)
Q_ARG(QWidget*, this),
Q_ARG(QStringList, list),
Q_ARG(int, number())));

Interactive development is of course possible, as the
local-server/editor from example 9 fit perfectly here.

So, you simply run the C++/Lisp application (natively), and any time
you want to make a change in Lisp, you only need to fire up the editor
and "eval region" something... (if you're new to example 9: evaluation
works using QLocalServer, connecting automatically).

Paul

Reply all
Reply to author
Forward
0 new messages