aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-10-22 14:10:04 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2019-10-23 07:35:12 +0000
commit94ce6853c1a279622daf22455bfd2a8637fdd94b (patch)
tree3a3eca71e65332209c87ff149ba1a9eddc22f0e8 /src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp
parent60bb13efbfb017faf0f68d04857010b27890ac8f (diff)
Fix widget order in import dialog so spinboxes can receive mouse focus
The label needs to be created before the spinbox or the label will block the spinbox mouse events, as the tail end of the labels overlaps the non-checkbox control column to avoid unnecessary cutoff of the labels that do not have any non-checkbox controls. Change-Id: If7a7fd671b0dbb3f4c1ab5570217455e4978765e Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp')
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp
index bfdbfe5c22..d7f84fddd1 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp
@@ -298,6 +298,10 @@ void ItemLibraryAssetImportDialog::createTab(const QString &tabLabel, int option
QJsonValue optValue = optObj.value("value");
QJsonArray conditions = optObj.value("conditions").toArray();
+ auto *optLabel = new QLabel(optionsAreaContents);
+ optLabel->setText(optName);
+ optLabel->setToolTip(optDesc);
+
QWidget *optControl = nullptr;
if (optType == "Boolean") {
auto *optCheck = new QCheckBox(optionsAreaContents);
@@ -346,15 +350,11 @@ void ItemLibraryAssetImportDialog::createTab(const QString &tabLabel, int option
qWarning() << __FUNCTION__ << "Unsupported option type:" << optType;
continue;
}
+ optControl->setToolTip(optDesc);
if (!conditions.isEmpty())
conditionMap.insert(optKey, conditions);
- auto *optLabel = new QLabel(optionsAreaContents);
- optLabel->setText(optName);
- optLabel->setToolTip(optDesc);
- optControl->setToolTip(optDesc);
-
const QString &groupName = optionToGroupMap.value(optKey);
if (!groupName.isEmpty() && groupIndexMap.contains(groupName))
widgets[groupIndexMap[groupName]].append({optLabel, optControl});