summaryrefslogtreecommitdiffstats
path: root/src/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-01-08 21:20:05 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-01-11 11:39:47 +0100
commitcb675cd758fdab9c5553bb5a9bd69f5a9b305a91 (patch)
tree319142f37afb5692f96b8d4ce828f0cdd69cf351 /src/designer
parentb27c8730175db14abb539dc949010ba90768a6de (diff)
Qt Designer: Display style in palette editor preview
Pick-to: 6.7 Task-number: QTBUG-120633 Change-Id: Ia45046dd6bb2b8e0bb7fb8190a79b186a9a2107e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/designer')
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditor.cpp2
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditor.ui5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/designer/src/components/propertyeditor/paletteeditor.cpp b/src/designer/src/components/propertyeditor/paletteeditor.cpp
index 6ef6b1cfa..80c767127 100644
--- a/src/designer/src/components/propertyeditor/paletteeditor.cpp
+++ b/src/designer/src/components/propertyeditor/paletteeditor.cpp
@@ -20,6 +20,7 @@
#include <QtWidgets/qlabel.h>
#include <QtWidgets/qmenu.h>
#include <QtWidgets/qheaderview.h>
+#include <QtWidgets/qstyle.h>
#include <QtGui/qaction.h>
#if QT_CONFIG(clipboard)
@@ -67,6 +68,7 @@ PaletteEditor::PaletteEditor(QDesignerFormEditorInterface *core, QWidget *parent
this, &PaletteEditor::detailsRadioClicked);
ui.paletteView->setModel(m_paletteModel);
+ ui.previewGroupBox->setTitle(tr("Preview (%1)").arg(style()->objectName()));
updatePreviewPalette();
updateStyledButton();
ui.paletteView->setModel(m_paletteModel);
diff --git a/src/designer/src/components/propertyeditor/paletteeditor.ui b/src/designer/src/components/propertyeditor/paletteeditor.ui
index 68cbe82ad..129165c73 100644
--- a/src/designer/src/components/propertyeditor/paletteeditor.ui
+++ b/src/designer/src/components/propertyeditor/paletteeditor.ui
@@ -1,5 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
-<comment>
+ <comment>
* Copyright (C) 2016 The Qt Company Ltd.
* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
</comment>
@@ -109,7 +110,7 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="GroupBox126">
+ <widget class="QGroupBox" name="previewGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>