From 479924497f0c7f6dfa238c9f8169871e5edf4915 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 20 Feb 2023 17:16:23 +0100 Subject: [PATCH] QmlDesigner: Fix feedback dialog on macOS Qt::SplashScreen prevents the widget from getting any keyboard focus. Using TextEdit for neutral styling. Change-Id: I56b9a3ac10d68aebdef4064fed4dd2e31bf82b8e Reviewed-by: Brook Cronin Reviewed-by: Thomas Hartmann --- .../qtcreator/qmldesigner/feedback/FeedbackPopup.qml | 11 +++++++++-- src/plugins/qmldesigner/qmldesignerplugin.cpp | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/qmldesigner/feedback/FeedbackPopup.qml b/share/qtcreator/qmldesigner/feedback/FeedbackPopup.qml index 58c131878c6..84976267985 100644 --- a/share/qtcreator/qmldesigner/feedback/FeedbackPopup.qml +++ b/share/qtcreator/qmldesigner/feedback/FeedbackPopup.qml @@ -66,14 +66,21 @@ Rectangle { height: 96 anchors { horizontalCenter: parent.horizontalCenter; top: starRow.bottom; topMargin: 28 } - TextArea { + TextEdit { id: textarea width: 426 height: 90 color: "#333333"; - placeholderText: "We highly appreciate additional feedback.\nBouquets, brickbats, or suggestions, all feedback is welcome!" font { pixelSize: 14; family: "Titillium" } wrapMode: Text.Wrap + property string placeholderText: "We highly appreciate additional feedback.\nBouquets, brickbats, or suggestions, all feedback is welcome!" + + Text { + text: textarea.placeholderText + color: "gray" + visible: !textarea.text + font: parent.font + } } background: Rectangle { diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp index 6bd489e1d41..a31684e8869 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.cpp +++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp @@ -740,7 +740,10 @@ void QmlDesignerPlugin::lauchFeedbackPopup(const QString &identifier) qDebug() << m_feedbackWidget->errors().first().toString(); } m_feedbackWidget->setWindowModality(Qt::ApplicationModal); - m_feedbackWidget->setWindowFlags(Qt::SplashScreen); + if (Utils::HostOsInfo::isMacHost()) + m_feedbackWidget->setWindowFlags(Qt::Dialog); + else + m_feedbackWidget->setWindowFlags(Qt::SplashScreen); m_feedbackWidget->setAttribute(Qt::WA_DeleteOnClose); QQuickItem *root = m_feedbackWidget->rootObject();