Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Scroll through listItem
I want to scroll to next item in list on the button click event and not through navigation keys.
In short, following functionality must processed:
focus moves to next item in the list (onDownButtonPressed)
focus moves to previous item in the list (onUpButtonPressed)
If page support max five entries, how to update the list with six item and 1st element in the list must be removed
please do share your suggestions.
Jeroentjehome last edited by
This is basic, Generate two slots (or the automatic slot from Designer) and then use the currentRow() + 1 to set the currentRow ;-)
So something like this:
// Will only do down, up is your thing to do ;-)
// Check if you already selected the last item
if (ui->myList.count() > ui->myList.currentRow())
ui->myList.setCurrentRow(ui->myList.currentRow() + 1);
Is it possible to do within QMLs without using C++ code.
I have 2 QMLs, SettingsList.qml (displays list data in the parent region) and a Navigation.qml (containing navigation pad which mouse area defined in it)
Now using these two QMLs in main.qml as:
@import QtQuick 2.0
//Navigation defines upKey, downKey, rightKey, leftKey and selectKey
Whenever downKey is Clicked, then next item must be highlighted in the list view and also it must be set to current list item.
How can i achieve above functionality.
is it possible to connect two QMLs through signals without using C++.
Please share an example or link where I can find relevant details.