Hi, I’m using a ListView wich is shown in an Rectangle an have a problem with the quantity of shown ListModelElements.
My ListModel includes 8 elements but I only want to show 4 of them.
Rectangle {
width: 340
height: 339
ListView {
...
delegate: Component {
Item {
width: 340
height: 85
}
}
}
}
Rectangle {
width: 340
height: 339
ListView {
...
delegate: Component {
Item {
width: 340
height: 85
}
}
}
}
To copy to clipboard, switch view to plain text mode
My First problem, I want to show 4 Items. 4* 85 = 340. But when I use height 340 instead of 339 for my Rectangle then always 5 elements shown.
Is using height 339 the best way to show only 4 Elements?
Second Problem is, when at start only 4 Elements shown and I navigate the highlight to the fourth Element, then the fifth Element is shown automatically.
Is it possible to prevent this?
I use Qt 5 alpha and QtQuick 2.0.
Thank You for your help.
Bookmarks