Class ExportAttribute
- Namespace
- Qt
- Assembly
- Qt.Bridge.CSharp.Api.dll
Configures how Qt Bridge exposes a managed type to QML
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Interface|AttributeTargets.Delegate, AllowMultiple = false)]
public class ExportAttribute : Attribute
- Inheritance
-
ExportAttribute
- Inherited Members
Remarks
Qt Bridge can expose a managed type either through wrapper-based export or through metadata-based export used during runtime registration.
This attribute can be applied at assembly scope to define the default export mode for types in that assembly, or at type scope to override that behavior for an individual type.
When defined at the scope of the root assembly, with Global equal to true, the attribute will apply to all types in all assemblies brought in as static / load-time dependencies.
For each type, Qt Bridge uses the first applicable export mode in this order:
- An attribute on the type.
- An attribute on the type's declaring assembly.
- An attribute with Global set to true on the root application assembly.
- The project's configured export default.
- The built-in source-export default.
An explicit Default at any attribute scope stops this lookup and selects the built-in source-export default.
Properties
Global
Apply export options globally
public bool Global { get; set; }
Property Value
Remarks
Only relevant if attribute is defined for the root assembly. Ignored otherwise.
Options
Custom export options
public Options Options { get; set; }