summaryrefslogtreecommitdiffstats
path: root/examples/sensors
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sensors')
-rw-r--r--examples/sensors/sensor_explorer/import/CMakeLists.txt6
-rw-r--r--examples/sensors/sensor_explorer/main.cpp9
-rw-r--r--examples/sensors/sensor_explorer/sensor_explorer.qml4
3 files changed, 10 insertions, 9 deletions
diff --git a/examples/sensors/sensor_explorer/import/CMakeLists.txt b/examples/sensors/sensor_explorer/import/CMakeLists.txt
index 57ae2040..306e1b7c 100644
--- a/examples/sensors/sensor_explorer/import/CMakeLists.txt
+++ b/examples/sensors/sensor_explorer/import/CMakeLists.txt
@@ -15,7 +15,11 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sensors/sensor_explorer/Explorer"
find_package(Qt6 COMPONENTS Core Gui Qml Sensors)
-if (MACOS)
+# Hack to convince qt6_add_qml_module to respect the shared-ness of a Qt build
+# TODO Qt 6.2 FIXME when a proper fix is available
+set(BUILD_SHARED_LIBS "${QT6_IS_SHARED_LIBS_BUILD}")
+
+if (APPLE AND NOT IOS)
set(PLUGIN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../sensor_explorer.app/Contents/MacOS/Explorer")
else()
set(PLUGIN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../Explorer")
diff --git a/examples/sensors/sensor_explorer/main.cpp b/examples/sensors/sensor_explorer/main.cpp
index bb0a3b17..418b85e3 100644
--- a/examples/sensors/sensor_explorer/main.cpp
+++ b/examples/sensors/sensor_explorer/main.cpp
@@ -50,18 +50,11 @@
#include <QtQml>
#include <QtQuick/QQuickWindow>
-
-#ifndef QT_NO_WIDGETS
-#include <QtWidgets/QApplication>
-#define Application QApplication
-#else
#include <QtGui/QGuiApplication>
-#define Application QGuiApplication
-#endif
int main(int argc, char *argv[])
{
- Application app(argc, argv);
+ QGuiApplication app(argc, argv);
QQmlApplicationEngine engine(QUrl("qrc:///sensor_explorer.qml"));
QObject *topLevel = engine.rootObjects().value(0);
QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
diff --git a/examples/sensors/sensor_explorer/sensor_explorer.qml b/examples/sensors/sensor_explorer/sensor_explorer.qml
index 24e22133..c8b9e538 100644
--- a/examples/sensors/sensor_explorer/sensor_explorer.qml
+++ b/examples/sensors/sensor_explorer/sensor_explorer.qml
@@ -74,11 +74,14 @@ Window {
anchors.margins: 8
spacing: 8
+ /* TODO Qt 6.2 FIX TableView and TableViewColumn
+
GroupBox {
title: qsTr("Available Sensors")
width: parent.width
height: window.height * 0.4
+
TableView {
id: sensorList
anchors.fill: parent
@@ -220,5 +223,6 @@ Window {
}
}
}
+ */
}
}