add tutorial in 'Qt_EQL/' for accessing C++ apps from Lisp

This commit is contained in:
polos 2021-05-07 19:06:19 +02:00
parent 490c878dee
commit 28d5d133fb
6 changed files with 174 additions and 0 deletions

27
Qt_EQL/tutorial/test.h Normal file
View file

@ -0,0 +1,27 @@
#ifndef APP_H
#define APP_H
#include <QObject>
#include <ecl/ecl.h>
class Test : public QObject {
Q_OBJECT
public:
Test(QObject*, const QString&);
// define function acting as constructor (callable from Lisp)
// N.B. return a vanilla Qt class (here: QObject*) known to EQL5
Q_INVOKABLE QObject* newInstance(QObject*, const QString&);
public Q_SLOTS:
// you may pass any type found in '~/eql5/src/ecl_fun.cpp::toMetaArg()'
QString concat(const QStringList&);
// pass Lisp data
void processData(cl_object);
// call back to Lisp
void printMe();
};
#endif