QmlDesigner.PropertyEditor: Color coding for LineEdit

This commit is contained in:
Christiaan Janssen
2010-02-26 15:20:34 +01:00
parent 1c3e5cfe8f
commit cecd7bbf6d
3 changed files with 21 additions and 9 deletions

View File

@@ -33,6 +33,7 @@ QExtGroupBox {
LineEdit {
backendValue: colorGroupBox.backendColor
baseStateFlag: isBaseState
}
ColorButton {

View File

@@ -7,9 +7,19 @@ QWidget {
property var backendValue
property alias enabled: lineEdit.enabled
property var baseStateFlag
property alias text: lineEditWidget.text
minimumHeight: 24;
onBaseStateFlagChanged: {
evaluate();
}
property var isEnabled: comboBox.enabled
onIsEnabledChanged: {
evaluate();
}
Script {
function evaluate() {
if (!enabled) {
@@ -42,6 +52,7 @@ QWidget {
onTextEdited: {
backendValue.value = text
evaluate();
}
onFocusChanged: {

View File

@@ -63,7 +63,7 @@ GroupBox {
}
}
ColorLabel {
ColorLabel {
text: " Color"
}
@@ -74,13 +74,13 @@ GroupBox {
backendColor: backendValues.color
}
ColorLabel {
visible: showStyleColor
ColorLabel {
visible: showStyleColor
text: " Style Color"
}
ColorGroupBox {
visible: showStyleColor
visible: showStyleColor
finished: finishedNotify
backendColor: backendValues.styleColor || null