Using Union in applications
Using Union without any application changes
QtQuick Applications
Support for styling QtQuick applications with Union is provided by the QtQuick Output plugin. This plugin implements a full QtQuick Controls style. To use it in your application, you can set the QT_QUICK_CONTROLS_STYLE
environment variable to org.kde.union
. There are also other ways of specifying it, see the Qt Documentation for more details.
QtWidgets Applications
Support for styling QtWidgets applications with Union is provided by the QtWidgets Output plugin. This plugin implements a QStyle that can be used with Qt.
Exposing custom types to Union
How to expose custom types depends on how the type is defined.
QtQuick Types
For QtQuick based types, you can use the API exposed by the QtQuick Output plugin. Explicitly import Union using import org.kde.union
and use the Element type to provide information about your type. You can use the Style type to read style properties to style your type.