diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-08-13 13:28:33 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-08-13 13:28:33 +0200 |
commit | 0c4135e38097d482ce586b65867ec61185f703f1 (patch) | |
tree | 875435d3944d598850744384ba5580c2892f2441 /share/qtcreator/qmldesigner | |
parent | 94f61139906e5e4604d026d4a46c4861f7c15be6 (diff) | |
parent | 54b1aaed0381c0d6dce14caad2a3223620e7cc7a (diff) |
Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
src/plugins/android/androiddeployqtstep.cpp
Change-Id: Id624bad384050d567efba0700046331086cb12dd
Diffstat (limited to 'share/qtcreator/qmldesigner')
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml index c62b7a6841..aef6317b9c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml @@ -26,6 +26,8 @@ import QtQuick 2.1 import HelperWidgets 2.0 import QtQuick.Layouts 1.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme Section { anchors.left: parent.left @@ -46,9 +48,29 @@ Section { Label { text: qsTr("Text") } - LineEdit { - backendValue: backendValues.text - Layout.fillWidth: true + + RowLayout { + LineEdit { + backendValue: backendValues.text + Layout.fillWidth: true + } + + StudioControls.AbstractButton { + id: richTextEditorButton + buttonIcon: StudioTheme.Constants.textAlignTop + onClicked: { + richTextDialogLoader.show() + } + } + + RichTextEditor{ + onRejected: { + hideWidget() + } + onAccepted: { + hideWidget() + } + } } Label { @@ -219,4 +241,39 @@ Section { Layout.fillWidth: true } } + + Loader { + id: richTextDialogLoader + + visible: false + active: visible + + function show() { + richTextDialogLoader.visible = true + } + + sourceComponent: Item { + id: richTextEditorParent + + Component.onCompleted: { + richTextEditor.showWidget() + richTextEditor.richText = backendValues.text.value + } + + RichTextEditor { + id: richTextEditor + + onRejected: { + hideWidget() + richTextDialogLoader.visible = false + } + onAccepted: { + backendValues.text.value = richTextEditor.richText + backendValues.textFormat.setEnumeration("Text", "RichText") + hideWidget() + richTextDialogLoader.visible = false + } + } + } + } } |