2021-10-12 15:29:40 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
|
|
|
import Sandbox 0.1
|
2022-07-30 14:45:22 +00:00
|
|
|
|
2021-10-12 15:29:40 +00:00
|
|
|
Column {
|
2022-07-30 14:45:22 +00:00
|
|
|
spacing: 20
|
|
|
|
|
|
|
|
ListModel {
|
|
|
|
id: commmonModel
|
|
|
|
ListElement {
|
|
|
|
name: "Pascal"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
name: "Khushboo"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
name: "Alexandra"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
name: "Eric"
|
|
|
|
}
|
|
|
|
}
|
2021-10-12 15:29:40 +00:00
|
|
|
|
2022-08-03 12:13:31 +00:00
|
|
|
StatusBaseText {
|
|
|
|
font.pixelSize: 16
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
text: "This component should no longer be used.<br />Please, use `StatusComboBox` instead."
|
|
|
|
textFormat: Text.MarkdownText
|
|
|
|
}
|
|
|
|
|
2021-10-12 15:29:40 +00:00
|
|
|
StatusSelect {
|
|
|
|
id: select
|
|
|
|
label: "Some label"
|
2022-07-30 14:45:22 +00:00
|
|
|
model: commmonModel
|
|
|
|
|
2021-10-12 15:29:40 +00:00
|
|
|
selectMenu.delegate: StatusMenuItemDelegate {
|
|
|
|
statusPopupMenu: select
|
|
|
|
action: StatusMenuItem {
|
|
|
|
iconSettings.name: "filled-account"
|
|
|
|
text: name
|
|
|
|
onTriggered: {
|
|
|
|
selectedItem.text = name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-30 14:45:22 +00:00
|
|
|
|
2021-10-12 15:29:40 +00:00
|
|
|
selectedItemComponent: Item {
|
|
|
|
id: selectedItem
|
|
|
|
anchors.fill: parent
|
|
|
|
property string text: ""
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
text: selectedItem.text
|
|
|
|
anchors.centerIn: parent
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|