1. Can a QML singleton contain signals and functions that are accessed by other
QML types or just properties?
2. I specified
pragma singleton
as the first line in MySingleton.qml and have
property string myText: “”
in MySingleton.qml, specified
import “.”
at the top of main.qml, and added qml in their common directory with
singleton MySingleton MySingleton.qml
When I have
property string mySingletonText: MySingleton.myText
in main.qml I get the error
qrc:/qml/main.qml:11: ReferenceError: MySingleton is not defined
but MySingleton.qml is specified in my .pro and .qrc files.
When I have
MySingleton{
id: singleton
}
in main.qml I get the error
qrc:/qml/MySingleton.qml:1:1: pragma Singleton used with a non composite
singleton type MySingleton
I tried this because I assumed (perhaps mistakenly) that this would be the way
to access signals and functions of a singleton.
Any help would be appreciated.
Thanks.
Steve
BTW, is a different group more appropriate. In addition, should I post this in
the forums or use a group email?
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development