AB
Aleksej BobrovDec. 14, 2021, 7:03 p.m.

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

We recommend hosting TIMEWEB
We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.
0

Comments

Only authorized users can post comments.
Please, Log in or Sign up
Fornex

Let me recommend you a great European Fornex hosting.

Fornex has proven itself to be a stable host over the years.

For Django projects I recommend VPS hosting

Following the link you will receive a 5% discount on shared hosting services, dedicated servers, VPS and VPN

View Hosting
MP

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:60points,
  • Rating points-1
SI

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:60points,
  • Rating points-1
k

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:90points,
  • Rating points8
Last comments
H

Python: How to Test Internet Speed

In behalf of cinephiles who submit self-referential scares, these 10 movies iron crucial spirits at the audience — and themselves. The “Bay” franchise returned to theaters this weekend wit…
H

Python: How to Test Internet Speed

There may be no animus franchise that opens with as dull-witted and satiating a ritual as Scream. As the shaping followers’s logo appears on wall, we rather enter upon hearing the ringing of a l…
A
  • Andrew
  • Jan. 12, 2022, 11:41 a.m.

Qt/C++ - Lesson 038. Switching between windows in the Qt

Здравствуйте, а как сделать чтобы второе и третье окно не сохраняли свои параметры а создавались заного? Только начинаю изучать прогграмирование и пишу протенькую игру сделал 2 окна, одно с меню…
j
  • juvf
  • Dec. 28, 2021, 11:56 p.m.

Deploying Qt and QML Applications on Linux and Windows

написал приложение, холоворд на qt виджетах, без qml. Из визарда QtCreator. Собрал кросскомпилятором. Нужно перенести на таргет. juvf@juvf-VirtualBox:~/qtWs/test/imx6/release$ ~/CQtDeploye…
AO

Qt/C++ - Lesson 023. Moving QGraphicsItem on QGraphicsScene with mouse help

А есть возможность передавать координаты классу, что-бы он рисвал, допустим линию?
Now discuss on the forum
MS

Октуда берется user?

Я все понял, спасибо большое за помощь)
AB

Sorting the added QML elements in the ListModel

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 …
VK

Как получить ссылку на обьект присылающий сигнал через сигнал/слот?

Вот и ответ: Спасибо Александру за подсказку. void Core::onLogin(QString m_login) { Worker *m_worker = qobject_cast (sender()); hashLogin.insert(m_login, m_wor…
v

подтвердить значение в SpinBox

Мне необходимо подтвердить значение в SpinBox нажатием клавиши Enter и перевести фокус на другое поле. self.doubleSpinBox.returnPressed.co nnect(self.pressedKeys) def pressedKeys(sel…

Сортировка по дате и времени QSortFilterProxyModel QSqlRelationalTableModel

Добрый день. Наследуйте модель сортировки от QSortFilterProxyModel и переопределите метод QSortFilterProxyModel::lessThan таким образом, чтобы вы забирали через индексы дату и в…
About
Services
© EVILEG 2015-2021
Recommend hosting TIMEWEB