Singleton Class
(Qul::Items::Singleton)Header: | #include <Singleton> |
Inherits: | Qul::Items::QtObject |
Static Public Members
T & | instance() |
Detailed Description
Inherit from this class to expose this class from QML as a singleton. qmlinterface extractor will generate "pragma Singleton" for class derived from singleton.
This class use the Curiously recurring template pattern (CRTP) and the template parameter needs to be the derived type.
Example:
struct MySingleton : public Qul::Items::Singleton<MySingleton> { Property<int> someProperty; int someFunction(int param); };