bindings_test: initial commit

This commit is contained in:
mappu 2024-08-06 10:24:01 +12:00
parent a9c74647ec
commit 120c5bcbdd
3 changed files with 27 additions and 0 deletions

7
bindings_test/build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -eux
g++ -g -fPIC ../binding.cpp testapp.cpp $(pkg-config --cflags --libs Qt5Widgets) -o testapp
g++ -g -fPIC direct.cpp $(pkg-config --cflags --libs Qt5Widgets) -o direct

9
bindings_test/direct.cpp Normal file
View File

@ -0,0 +1,9 @@
#include <QtWidgets>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget window;
window.show();
return app.exec();
}

11
bindings_test/testapp.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "../binding.h"
int main(int argc, char** argv) {
PQApplication app = QApplication_new(&argc, argv);
PQWidget w = QWidget_new();
QWidget_show(w);
return QApplication_exec(app);
}