Is it possible to create the ComboBox with images instead of strings? It doesn't support delegate:
ComboBox {
currentIndex: 2
model: ListModel {
id: cbItems
ListElement { imageHeight: 280; imageSource: "../images/tee3.png" }
ListElement { imageHeight: 300; imageSource: "../images/tee5.png" }
ListElement { imageHeight: 218; imageSource: "../images/tee1.png" }
}
delegate: Image {
height: imageHeight
fillMode: Image.PreserveAspectFit
source: imageSource
}
width: 200
}
You can maybe do it by defining you own ComboBoxStyle (here the documentation) and playing with the label field which is a Component.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With