Hi. In the official QML documentation we see the following suggestion (
http://doc.qt.io/qt-5/qtquick-performance.html):

>>>
Use singleton types instead of pragma library scripts

If you are using a pragma library script to store application-wide instance
data, consider using a QObject singleton type instead. This should result
in better performance, and will result in less JavaScript heap memory being
used.
<<<

What does is mean? How should we use QObject singletons? For example, I
have the following ".pragma library" JS to store application-wide constants:

.pragma library
var X = 10;
... many other declarations...

How should I rewrite this with QObject singletons?
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to