diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-09-06 23:27:32 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-06 23:31:16 +0200 |
commit | 9a9a9bd1144663e2cb74efdd3d3f6d76c72313f9 (patch) | |
tree | 2811ccf99d641b040587716f17be8c59a30e11fe /examples/quickcontrols2/texteditor | |
parent | 320647bce7d968b5798dfc6946df555a548e3f8f (diff) | |
parent | 86180aed5008779b1b94731d9b4c6b1fdac8f3d3 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: If097242bfffe435d3b379a73eb6c8f54bed8495b
Diffstat (limited to 'examples/quickcontrols2/texteditor')
-rw-r--r-- | examples/quickcontrols2/texteditor/qml/+touch/texteditor.qml | 17 | ||||
-rw-r--r-- | examples/quickcontrols2/texteditor/texteditor.cpp | 11 |
2 files changed, 10 insertions, 18 deletions
diff --git a/examples/quickcontrols2/texteditor/qml/+touch/texteditor.qml b/examples/quickcontrols2/texteditor/qml/+touch/texteditor.qml index a7f176a9..11d153f5 100644 --- a/examples/quickcontrols2/texteditor/qml/+touch/texteditor.qml +++ b/examples/quickcontrols2/texteditor/qml/+touch/texteditor.qml @@ -38,7 +38,6 @@ ** ****************************************************************************/ -import QtGraphicalEffects 1.0 import QtQuick 2.8 import QtQuick.Controls 2.1 import QtQuick.Controls.Material 2.1 @@ -226,7 +225,7 @@ ApplicationWindow { } } - Button { + RoundButton { id: editButton font.family: "fontello" text: "\uE809" // icon-pencil @@ -245,20 +244,6 @@ ApplicationWindow { // Force focus on the text area so the cursor and footer show up. textArea.forceActiveFocus() } - - background: Rectangle { - implicitWidth: parent.width - implicitHeight: parent.height - radius: width / 2 - color: parent.down ? Qt.darker(Material.accent) : Material.accent - - layer.enabled: editButton.enabled - layer.effect: DropShadow { - color: "#44000000" - verticalOffset: 2 - samples: 16 - } - } } Dialog { diff --git a/examples/quickcontrols2/texteditor/texteditor.cpp b/examples/quickcontrols2/texteditor/texteditor.cpp index 7fda4fa9..10ba675c 100644 --- a/examples/quickcontrols2/texteditor/texteditor.cpp +++ b/examples/quickcontrols2/texteditor/texteditor.cpp @@ -70,10 +70,17 @@ int main(int argc, char *argv[]) qmlRegisterType<DocumentHandler>("io.qt.examples.texteditor", 1, 0, "DocumentHandler"); - QQmlApplicationEngine engine; + QStringList selectors; #ifdef QT_EXTRA_FILE_SELECTOR - QQmlFileSelector::get(&engine)->setExtraSelectors(QStringList() << QT_EXTRA_FILE_SELECTOR); + selectors += QT_EXTRA_FILE_SELECTOR; +#else + if (app.arguments().contains("-touch")) + selectors += "touch"; #endif + + QQmlApplicationEngine engine; + QQmlFileSelector::get(&engine)->setExtraSelectors(selectors); + engine.load(QUrl("qrc:/qml/texteditor.qml")); if (engine.rootObjects().isEmpty()) return -1; |