Hello @ALL,
My mobile app contains a UI to let users doing some requests to select data around here position.
I've two combobox listing the possible values to search. The search function works fine and return the desired results.
Here's the app UI
When I display the values of the combobox (both of them), it takes all the height of the app's window. Is there any way to limit the size of the list and allow the possibility to scroll?
Thanks for your help
Here's my code managing the two combobox:
Flickable {
anchors.fill: parent
contentHeight: optionsLayout.height + 30 * scaleFactor
GridLayout {
columns: 2
id: optionsLayout
anchors {
top: parent.top;
topMargin: 10*scaleFactor;
leftMargin: 10*scaleFactor;
rightMargin: 10*scaleFactor;
left: parent.left;
right:parent.right;
}
Text {
font.bold: true
Layout.columnSpan: 2
text : "Liste 1"
horizontalAlignment : Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 12 * scaleFactor
Layout.fillHeight: true
Layout.fillWidth: true
}
ComboBox {
model:domainesModel
Layout.columnSpan: 2
Layout.fillHeight: true
Layout.fillWidth: true
delegate: Item{
height: 35 * scaleFactor
Row {
spacing: 0 * scaleFactor
CheckBox {
id: checkDis
scale : 1.5
checkState: checked ? "Checked" : "Unchecked"
onClicked: {
myFunction()
}
}
Text {
text : libelle
horizontalAlignment : Text.AlignLeft
verticalAlignment: Text.AlignVCenter
font.pixelSize: 12 * scaleFactor
height: parent.height
elide: Text.ElideRight
}
}
}
}
Text {
font.bold: true
Layout.columnSpan: 2
text : "Liste 2"
horizontalAlignment : Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 12 * scaleFactor
Layout.fillHeight: true
Layout.fillWidth: true
}
ComboBox {
model:famillesModel
Layout.columnSpan: 2
Layout.fillHeight: true
Layout.fillWidth: true
delegate: Item{
height: 35 * scaleFactor
Row {
spacing: 0*scaleFactor
CheckBox {
id: checkVis
scale : 1.5
checkState: checked ? "Checked" : "Unchecked"
onClicked: {
myFunction()
}
}
Text {
text : libelle
horizontalAlignment : Text.AlignLeft
verticalAlignment: Text.AlignVCenter
font.pixelSize: 12 * scaleFactor
height: parent.height
elide: Text.ElideRight
}
}
}
}
}
}