From cdaf26d23204a0a745885ab0db886388618d50db Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 9 Mar 2016 10:46:13 +0200 Subject: qtwebbrowser: add pro file to create stand-alone application Current pro file only creates the qml plugin needed to run QtWebBrowser demo from the qtlauncher. Add separate pro file for creating the application that can be deployed and launched from QtCreator. Additionally use the resource file from tqtc-qtwebbrowser, so we can use the qml files from the qml plugin instead of filesystem. Task-number: QTEE-1083 Change-Id: I700824fc82d70c40379a4e97513b7e3947be6fdd Reviewed-by: Kimmo Ollila --- basicsuite/qtwebbrowser/app.pro | 13 +++++++++++++ basicsuite/qtwebbrowser/lib.pro | 29 +++++++++++++++++++++++++++++ basicsuite/qtwebbrowser/main.qml | 3 ++- basicsuite/qtwebbrowser/qtwebbrowser.pro | 31 ++++--------------------------- 4 files changed, 48 insertions(+), 28 deletions(-) create mode 100644 basicsuite/qtwebbrowser/app.pro create mode 100644 basicsuite/qtwebbrowser/lib.pro (limited to 'basicsuite') diff --git a/basicsuite/qtwebbrowser/app.pro b/basicsuite/qtwebbrowser/app.pro new file mode 100644 index 0000000..eda1be9 --- /dev/null +++ b/basicsuite/qtwebbrowser/app.pro @@ -0,0 +1,13 @@ +TARGET = qtwebbrowser + +include(../shared/shared.pri) +b2qtdemo_deploy_defaults() + +content.files = \ + *.qml \ + *.png +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content diff --git a/basicsuite/qtwebbrowser/lib.pro b/basicsuite/qtwebbrowser/lib.pro new file mode 100644 index 0000000..16152f2 --- /dev/null +++ b/basicsuite/qtwebbrowser/lib.pro @@ -0,0 +1,29 @@ +TEMPLATE = lib +TARGET = webbrowser +QT += qml quick +CONFIG += qt plugin + +INCLUDEPATH += tqtc-qtwebbrowser/src + +HEADERS += \ + tqtc-qtwebbrowser/src/appengine.h \ + tqtc-qtwebbrowser/src/touchtracker.h \ + tqtc-qtwebbrowser/src/navigationhistoryproxymodel.h + +SOURCES += \ + plugin.cpp \ + tqtc-qtwebbrowser/src/appengine.cpp \ + tqtc-qtwebbrowser/src/touchtracker.cpp \ + tqtc-qtwebbrowser/src/navigationhistoryproxymodel.cpp + +pluginfiles.files += \ + qmldir + +RESOURCES += tqtc-qtwebbrowser/src/resources.qrc + +B2QT_DEPLOYPATH = /data/user/qt/qmlplugins/WebBrowser + +target.path = $$B2QT_DEPLOYPATH +pluginfiles.path = $$B2QT_DEPLOYPATH + +INSTALLS += target pluginfiles diff --git a/basicsuite/qtwebbrowser/main.qml b/basicsuite/qtwebbrowser/main.qml index dcca154..c0f795c 100644 --- a/basicsuite/qtwebbrowser/main.qml +++ b/basicsuite/qtwebbrowser/main.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 +import WebBrowser 1.0 Loader { - source: "tqtc-qtwebbrowser/src/qml/BrowserWindow.qml" + source: "qrc:/qml/BrowserWindow.qml" } diff --git a/basicsuite/qtwebbrowser/qtwebbrowser.pro b/basicsuite/qtwebbrowser/qtwebbrowser.pro index 8532344..dc2f809 100644 --- a/basicsuite/qtwebbrowser/qtwebbrowser.pro +++ b/basicsuite/qtwebbrowser/qtwebbrowser.pro @@ -1,27 +1,4 @@ -TEMPLATE = lib -TARGET = webbrowser -QT += qml quick -CONFIG += qt plugin - -INCLUDEPATH += tqtc-qtwebbrowser/src - -HEADERS += \ - tqtc-qtwebbrowser/src/appengine.h \ - tqtc-qtwebbrowser/src/touchtracker.h \ - tqtc-qtwebbrowser/src/navigationhistoryproxymodel.h - -SOURCES += \ - plugin.cpp \ - tqtc-qtwebbrowser/src/appengine.cpp \ - tqtc-qtwebbrowser/src/touchtracker.cpp \ - tqtc-qtwebbrowser/src/navigationhistoryproxymodel.cpp - -pluginfiles.files += \ - qmldir - -B2QT_DEPLOYPATH = /data/user/qt/qmlplugins/WebBrowser - -target.path = $$B2QT_DEPLOYPATH -pluginfiles.path = $$B2QT_DEPLOYPATH - -INSTALLS += target pluginfiles +TEMPLATE = subdirs +SUBDIRS += \ + lib.pro \ + app.pro -- cgit v1.2.3