Commit Graph

2 Commits

Author SHA1 Message Date
jordi fita mas d0e2659c30 List the labels of all lodgings in QML
To query the database, i have to run the query inside the same thread
where the database was created, which means that Database should be a
singleton not only within QML, but also in C++, and has to be the _same_
singleton in both worlds.

Although i expose an object that i have created, i followed the same
section titled “Exposing an existing object as a singleton” from Qt’s
documentation[0].  The only difference is that i do not have to declare
the element as a foreign type, because it is a bona fide QObject.

[0]: https://doc.qt.io/qt-6/qml-singleton.html#exposing-an-existing-
object-as-a-singleton
2024-12-24 03:46:20 +01:00
jordi fita mas 49b2c035ad Add skeleton for a QML application 2024-12-14 01:19:20 +01:00