summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-09-16 15:18:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-09-16 15:18:04 +0200
commit418d0345380140bc5e2ad77987cad6aa081c1878 (patch)
treef1ba6e763dff91d5044b656364d062499a49e637 /tools/designer
parentbc7eb95302d9fac44c8e922b173a576aaa9606d5 (diff)
Fix alpha setting in Designer's "Edit Palette" window
Use QColorDialog::getColor() instead of deprecated QColorDialog::getRgba(), which causes alpha value to get lost in the process. Task-number: QT-4494 Reviewed-by: Jarek Kobus <jkobus@trolltech.com>
Diffstat (limited to 'tools/designer')
-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 c7668b1bb4..b9f9ba2ead 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) {