summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib/shared/stylesheeteditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/src/lib/shared/stylesheeteditor.cpp')
-rw-r--r--tools/designer/src/lib/shared/stylesheeteditor.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/designer/src/lib/shared/stylesheeteditor.cpp b/tools/designer/src/lib/shared/stylesheeteditor.cpp
index c7668b1..b9f9ba2 100644
--- a/tools/designer/src/lib/shared/stylesheeteditor.cpp
+++ b/tools/designer/src/lib/shared/stylesheeteditor.cpp
@@ -240,13 +240,10 @@ void StyleSheetEditorDialog::slotAddGradient(const QString &property)
void StyleSheetEditorDialog::slotAddColor(const QString &property)
{
- bool ok;
- QRgb rgba = QColorDialog::getRgba(0xffffffff, &ok, this);
- if (!ok)
+ const QColor color = QColorDialog::getColor(0xffffffff, this, QString(), QColorDialog::ShowAlphaChannel);
+ if (!color.isValid())
return;
- QColor color;
- color.setRgba(rgba);
QString colorStr;
if (color.alpha() == 255) {