forked from qt-creator/qt-creator
QmlDesigner.PropertyEditor: Color coding for LineEdit
This commit is contained in:
@@ -33,6 +33,7 @@ QExtGroupBox {
|
|||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
backendValue: colorGroupBox.backendColor
|
backendValue: colorGroupBox.backendColor
|
||||||
|
baseStateFlag: isBaseState
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorButton {
|
ColorButton {
|
||||||
|
|||||||
@@ -7,9 +7,19 @@ QWidget {
|
|||||||
property var backendValue
|
property var backendValue
|
||||||
property alias enabled: lineEdit.enabled
|
property alias enabled: lineEdit.enabled
|
||||||
property var baseStateFlag
|
property var baseStateFlag
|
||||||
|
property alias text: lineEditWidget.text
|
||||||
|
|
||||||
minimumHeight: 24;
|
minimumHeight: 24;
|
||||||
|
|
||||||
|
onBaseStateFlagChanged: {
|
||||||
|
evaluate();
|
||||||
|
}
|
||||||
|
|
||||||
|
property var isEnabled: comboBox.enabled
|
||||||
|
onIsEnabledChanged: {
|
||||||
|
evaluate();
|
||||||
|
}
|
||||||
|
|
||||||
Script {
|
Script {
|
||||||
function evaluate() {
|
function evaluate() {
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
@@ -42,6 +52,7 @@ QWidget {
|
|||||||
|
|
||||||
onTextEdited: {
|
onTextEdited: {
|
||||||
backendValue.value = text
|
backendValue.value = text
|
||||||
|
evaluate();
|
||||||
}
|
}
|
||||||
|
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
|
|||||||
Reference in New Issue
Block a user