Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
9f0d5d58
Commit
9f0d5d58
authored
Apr 07, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.propertyEditor: fix ComboBox.qml
parent
a295ec49
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qmldesigner/propertyeditor/Qt/ComboBox.qml
View file @
9f0d5d58
...
...
@@ -49,6 +49,18 @@ QWidget {
id
:
box
property
var
backendValue
:
comboBox
.
backendValue
onCurrentTextChanged
:
{
backendValue
.
value
=
currentText
;
evaluate
();
}
onItemsChanged
:
{
if
(
comboBox
.
backendValue
.
value
==
curentText
)
return
;
box
.
setCurrentTextSilent
(
comboBox
.
backendValue
.
value
);
}
property
var
backendValueValue
:
comboBox
.
backendValue
.
value
onBackendValueValueChanged
:
{
if
(
comboBox
.
backendValue
.
value
==
curentText
)
return
;
box
.
setCurrentTextSilent
(
comboBox
.
backendValue
.
value
);
}
ExtendedFunctionButton
{
backendValue
:
comboBox
.
backendValue
;
y
:
3
...
...
src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp
View file @
9f0d5d58
...
...
@@ -808,6 +808,18 @@ public slots:
emit
currentTextChanged
();
}
}
public
slots
:
void
setCurrentTextSilent
(
const
QString
&
text
)
{
if
(
!
m_itemsSet
)
return
;
int
i
=
cb
->
findText
(
text
);
if
(
i
!=
-
1
)
{
blockSignals
(
true
);
cb
->
setCurrentIndex
(
i
);
blockSignals
(
false
);
}
}
signals:
void
currentTextChanged
();
void
itemsChanged
();
...
...
@@ -817,8 +829,10 @@ private:
{
_items
=
list
;
cb
->
clear
();
blockSignals
(
true
);
cb
->
addItems
(
list
);
m_itemsSet
=
true
;
blockSignals
(
false
);
emit
itemsChanged
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment