АБ
Жел. 15, 2021, 6:03 Т.Ж.

Sorting the added QML elements in the ListModel

QML, Qt5, Quick

I am writing an alarm clock in QML, I am required to sort the alarms in ascending order (depending on the date or time (if there are several alarms on the same day).

I've done the sorting for existing alarm clocks (which are available from the very beginning. View the Alarm file Model.xml, the sort Model() function )

I need to sort the new alarms (which we add) in ascending order (depending on the date or time (if on the same day))

I attach the code below, this is my whole project, going to Qt Creator.

I have only 2 additions sorted and only by year, what should I do?

AlarmDelegate.qml AlarmDelegate.qml

AlarmDialog.qml AlarmDialog.qml

AlarmModel.qml AlarmModel.qml

main.qml main.qml

qtquickcontrols2.conf qtquickcontrols2.conf

TumblerDelegate.qml TumblerDelegate.qml

1

Ол саған ұнайды ма? Әлеуметтік желілерде бөлісіңіз!

0

Пікірлер

Тек рұқсаты бар пайдаланушылар ғана пікір қалдыра алады.
Кіріңіз немесе Тіркеліңіз