mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
NComboBox not default options
This commit is contained in:
@@ -8,9 +8,10 @@ ComboBox {
|
||||
id: root
|
||||
|
||||
readonly property real scaling: Scaling.scale(screen)
|
||||
property list<string> optionsKeys: ['cat', 'dog', 'bird', 'monkey', 'fish', 'turtle', 'elephant', 'tiger']
|
||||
property list<string> optionsLabels: ['Cat ', 'Dog', 'Bird', 'Monkey', 'Fish', 'Turtle', 'Elephant', 'Tiger']
|
||||
property string currentKey: "cat"
|
||||
|
||||
property list<string> optionsKeys: []
|
||||
property list<string> optionsLabels: []
|
||||
property string currentKey: ''
|
||||
property var onSelected: function (string) {}
|
||||
|
||||
Layout.fillWidth: true
|
||||
@@ -19,7 +20,7 @@ ComboBox {
|
||||
model: optionsKeys
|
||||
currentIndex: model.indexOf(currentKey)
|
||||
onActivated: {
|
||||
root.onSelected(model[currentIndex])
|
||||
root.onSelected(model[currentIndex])
|
||||
}
|
||||
|
||||
// Rounded background
|
||||
|
||||
Reference in New Issue
Block a user