Commit 1c556968 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: fix for color editing

In case alpha != 255 the constructor of QColor does not work.
Since we do resolve alias properties in the code model
we can explcitly "cast" to QColor using the property reader.

Same for url.

Change-Id: I15f67592efbf7c574d49cf687353a280cf3120e6
Reviewed-by: default avatarMarco Bubke <>
parent 68e96f43
......@@ -529,20 +529,26 @@ public:
QVariant v(cleanedValue);
if (property->asColorValue()) {
return PropertyParser::read(QVariant::Color, cleanedValue);
} else if (property->asUrlValue()) {
return PropertyParser::read(QVariant::Url, cleanedValue);
QVariant value(cleanedValue);
if (property->asBooleanValue()) {
} else if (property->asColorValue()) {
return value;
} else if (property->asNumberValue()) {
return value;
} else if (property->asStringValue()) {
// nothing to do
} else { //property alias et al
if (!hasQuotes)
return cleverConvert(cleanedValue);
return v;
return value;
QVariant convertToEnum(Statement *rhs, const QString &propertyPrefix, UiQualifiedId *propertyId)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment