mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-14 06:10:29 -08:00
27 lines
764 B
C++
27 lines
764 B
C++
#include "test.h"
|
|
#include <eql5/eql.h>
|
|
#include <QApplication>
|
|
#include <QLabel>
|
|
|
|
int main(int argc, char* argv[]) {
|
|
QApplication app(argc, argv);
|
|
|
|
QLabel* main = new QLabel("<h2>Main Window</h2>");
|
|
main->setAlignment(Qt::AlignCenter);
|
|
main->resize(600, 400);
|
|
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)");
|
|
EQL::eval("(load \"test.lisp\")"); // will start a REPL
|
|
app.processEvents(); // needed for 'qlater' in 'test.lisp'
|
|
|
|
return 0; // no 'app.exec()' because of REPL
|
|
}
|
|
|