From 74eab3ea56a43a9124feedfc506c9a7d737c3b4a Mon Sep 17 00:00:00 2001 From: talksik Date: Tue, 22 Aug 2023 14:22:20 -0700 Subject: [PATCH] adding in device running to test on nano --- device.sh | 27 +++++++++++++++++++++++++++ build.sh => run.sh | 0 src/main.qml | 8 ++++++++ 3 files changed, 35 insertions(+) create mode 100755 device.sh rename build.sh => run.sh (100%) diff --git a/device.sh b/device.sh new file mode 100755 index 0000000..3628ade --- /dev/null +++ b/device.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# this is special script for running on jetson nano + +export QT_DEBUG_PLUGINS=1 +export QT_QPA_EGLFS_WIDTH=1920 +export QT_QPA_EGLFS_HEIGHT=1080 +export QT_QPA_EGLFS_INTEGRATION=eglfs_kms + +export GST_DEBUG=2 + +rm -rf build +mkdir build +cd build + +echo "Running cmake with build type Debug." +cmake -Wall -DCMAKE_PREFIX_PATH=/home/pluto/Qt/ \ + -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=Debug .. + +make + +echo "running qml-example" + +cd .. +./build/qml-example -platform eglfs + + diff --git a/build.sh b/run.sh similarity index 100% rename from build.sh rename to run.sh diff --git a/src/main.qml b/src/main.qml index 347ba57..78037c9 100644 --- a/src/main.qml +++ b/src/main.qml @@ -7,5 +7,13 @@ ApplicationWindow width: 640 height: 480 title: qsTr("Minimal Qml") + + Rectangle { + id: rect + width: 100 + height: 100 + + color: "red" + } }