I have a tool bar ToolBar
on which I want to have a drop down button.
I tried to use ComboBox
, but the button is resized by the length of the list model items. And I don't know how to put actions on click events.
ToolBar {
id: toolBar
anchors.margins: 0
Layout.fillWidth: true
layer.enabled: true
RowLayout {
ComboBox {
id: databaseTypeInput
style: ComboBoxStyle {
label: ToolButton {
implicitWidth: 20
implicitHeight: 20
iconSource: "Image.png"
} // ToolButton
}
} // ComboBox
}
}
Anyway I think it is a wrong way of doing this.
Any way to easy create a drop down button with QtQuck 2.0 ?