add third argument to 'EQL::addObject' to call 'define-qt-wrappers'

This commit is contained in:
polos 2021-05-11 09:48:00 +02:00
parent 73844d81ab
commit 4f75551971
4 changed files with 35 additions and 22 deletions

View file

@ -12,13 +12,17 @@ int main(int argc, char* argv[]) {
main->show();
EQL eql;
// add desired Qt class instances as Lisp variables (uses 'defvar'):
EQL::addObject(main, "eql-user:*main-widget*");
EQL::addObject(new Test(main), "eql-user:*test*");
EQL::eval("(in-package :eql-user)");
// add desired Qt class instances as Lisp variables (uses 'defvar');
// you may provide a package name (which needs to exists), otherwise
// the current package will be used (see above 'in-package');
// pass 'true' as last argument to also call 'define-qt-wrappers'
EQL::addObject(main, "eql-user:*main-widget*");
EQL::addObject(new Test(main), "*test*", true); // 'define-qt-wrappers'
EQL::eval("(load \"test.lisp\")"); // will start a REPL
app.processEvents(); // needed for 'qlater' in 'test.lisp'