mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-18 11:58:11 +00:00
29 lines
659 B
QML
29 lines
659 B
QML
import QtQuick
|
|
import QtQuick.Controls.Material
|
|
import QtQuick.Layouts
|
|
import Linphone
|
|
import 'qrc:/Linphone/view/Control/Tool/Helper/utils.js' as Utils
|
|
|
|
ComboBox {
|
|
id: comboBox
|
|
Layout.preferredHeight: 49 * DefaultStyle.dp
|
|
property string propertyName
|
|
property var propertyOwner
|
|
property alias entries: comboBox.model
|
|
oneLine: true
|
|
currentIndex: Utils.findIndex(model, function (entry) {
|
|
return entry === propertyOwner[propertyName]
|
|
})
|
|
onCurrentTextChanged: {
|
|
binding.when = currentText != propertyOwner[propertyName]
|
|
}
|
|
Binding {
|
|
id: binding
|
|
target: propertyOwner
|
|
property: propertyName
|
|
value: comboBox.currentText
|
|
when: false
|
|
}
|
|
}
|
|
|
|
|