QExtensionManager Proxy Page
Macros
Q_DECLARE_EXTENSION_INTERFACE(ExtensionName, Identifier) |
Macro Documentation
Q_DECLARE_EXTENSION_INTERFACE(ExtensionName, Identifier)
Associates the given Identifier (a string literal) to the extension class called ExtensionName. The Identifier must be unique. For example:
Q_DECLARE_EXTENSION_INTERFACE(MyExtension, "com.mycompany.myproduct.myextension")
Using the company and product names is a good way to ensure uniqueness of the identifier.
When implementing a custom extension class, you must use Q_DECLARE_EXTENSION_INTERFACE() to enable usage of the qt_extension() function. The macro is normally located right after the class definition for ExtensionName, in the associated header file.
See also Q_DECLARE_INTERFACE().