From a840cbffba476205eba81f56f40ec32cea6097cc Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 28 Aug 2013 11:26:38 +0200 Subject: Doc: Update Sensor Explorer example Following changes are made to the example - Use of Qt Quick Controls / TableView to present the sensor information, reducing the example to a single QML file - Updated launcher main.cpp for the QML example - Remove separate example doc for the import subproject - Various fixes to example doc, add a screenshot - Ensure import module + qmldir are built/deployed to correct location Task-number: QTBUG-32881 Task-number: QTBUG-33875 Change-Id: I0ed7c7ebc916fcad6da5e3c66d81be8f348a93e1 Reviewed-by: Jerome Pasion --- examples/sensors/sensor_explorer/import/import.pro | 32 +++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'examples/sensors/sensor_explorer/import/import.pro') diff --git a/examples/sensors/sensor_explorer/import/import.pro b/examples/sensors/sensor_explorer/import/import.pro index 85f471c6..196c373c 100644 --- a/examples/sensors/sensor_explorer/import/import.pro +++ b/examples/sensors/sensor_explorer/import/import.pro @@ -2,21 +2,39 @@ TEMPLATE = lib CONFIG += plugin TARGET = $$qtLibraryTarget(declarative_explorer) -TARGETPATH = Explorer +DESTDIR = ../Explorer QT += qml sensors -SOURCES = main.cpp explorer.cpp sensoritem.cpp propertyinfo.cpp -HEADERS = explorer.h sensoritem.h propertyinfo.h +SOURCES = \ + main.cpp \ + explorer.cpp \ + sensoritem.cpp \ + propertyinfo.cpp -DESTPATH=$$[QT_INSTALL_EXAMPLES]/qtsensors/sensor_explorer/Explorer +HEADERS = \ + explorer.h \ + sensoritem.h \ + propertyinfo.h -target.path=$$DESTPATH -INSTALLS += target +DESTPATH=$$[QT_INSTALL_EXAMPLES]/sensors/sensor_explorer/Explorer +target.path=$$DESTPATH qmldir.files=$$PWD/qmldir qmldir.path=$$DESTPATH -INSTALLS += qmldir +INSTALLS += target qmldir OTHER_FILES += \ plugin.json qmldir + +copyfile = $$PWD/qmldir +copydest = $$DESTDIR + +# On Windows, use backslashes as directory separators +win32: { + copyfile ~= s,/,\\,g + copydest ~= s,/,\\,g +} + +# Copy the qmldir file to the same folder as the plugin binary +QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$copyfile) $$quote($$copydest) $$escape_expand(\\n\\t) -- cgit v1.2.3