diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml index d1395293ab60687903ceea3dd8b813422203c262..cd2cc4b82a1c94bd71f40ca6506a63662fbce0cf 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml @@ -56,10 +56,16 @@ QWidget { layout: HorizontalLayout { QFontComboBox { - id: fontSelector - // currentFont.family:backendValues.font_family.value - // onCurrentFontChanged: if (backendValues.font_family.value != currentFont.family) - // backendValues.font_family.value = currentFont.family; + id: fontSelector + + currentFont.family: backendValue.value + property var fontFamily: currentFont.family + onFontFamilyChanged: { + if (backendValue === undefined) + return; + if (backendValue.value != currentFont.family) + backendValue.value = currentFont.family; + } } } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml index ddc16d996f6db66c89549d3801e832401e326700..8f7a86c96abd5703e4f8cb0f967bd8ed7b1aec1a 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml @@ -14,13 +14,9 @@ GroupBox { Label { text: qsTr("Font") } + FontComboBox { - id: fontSelector - currentFont.family:backendValues.font_family.value - onCurrentFontChanged: if (backendValues.font_family.value != currentFont.family) - backendValues.font_family.value = currentFont.family; - - backendValue:backendValues.font_family + backendValue: backendValues.font_family baseStateFlag: isBaseState } } @@ -66,11 +62,11 @@ GroupBox { ComboBox { baseStateFlag:isBaseState - backendValue: backendValues.style + backendValue: (backendValues.style === undefined) ? dummyBackendValue : backendValues.style items : { ["Normal", "Outline", "Raised", "Sunken"] } - currentText: backendValues.style.value; + currentText: backendValue.value; onItemsChanged: { - currentText = backendValues.style.value; + currentText = backendValue.value; } } }