Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.14
-
None
Description
https://doc.qt.io/qt-5/qml-qtqml-loggingcategory.html says:
Note: As the creation of objects is expensive, it is encouraged to put the needed LoggingCategory definitions into a singleton and import this where needed.
New users might have no idea how to do this. We should have an example that demonstrates how such a singleton would look. For example:
pragma Singleton import QtQml 2.12 QtObject { property LoggingCategory dialogs: LoggingCategory { name: "app.ui.dialogs" } property LoggingCategory settings: LoggingCategory { name: "app.settings" } }
and then link to the documentation that describes how the qmldir should look, etc.