From 120c5bcbdd50025b0358fca797d5bc9de49954b5 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 6 Aug 2024 10:24:01 +1200 Subject: [PATCH] bindings_test: initial commit --- bindings_test/build.sh | 7 +++++++ bindings_test/direct.cpp | 9 +++++++++ bindings_test/testapp.cpp | 11 +++++++++++ 3 files changed, 27 insertions(+) create mode 100755 bindings_test/build.sh create mode 100644 bindings_test/direct.cpp create mode 100644 bindings_test/testapp.cpp diff --git a/bindings_test/build.sh b/bindings_test/build.sh new file mode 100755 index 00000000..d4bbcc3d --- /dev/null +++ b/bindings_test/build.sh @@ -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 diff --git a/bindings_test/direct.cpp b/bindings_test/direct.cpp new file mode 100644 index 00000000..ad616894 --- /dev/null +++ b/bindings_test/direct.cpp @@ -0,0 +1,9 @@ +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QWidget window; + window.show(); + return app.exec(); +} diff --git a/bindings_test/testapp.cpp b/bindings_test/testapp.cpp new file mode 100644 index 00000000..24dec85f --- /dev/null +++ b/bindings_test/testapp.cpp @@ -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); +} \ No newline at end of file