Table of Contents

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.

Precedence is:

  1. If a type has no ExportAttribute, it inherits any assembly-level export setting.
  2. If a type explicitly sets Metadata or SourceCode, that type-level choice overrides the assembly-level setting.
  3. If a type explicitly sets Default, it resets to the built-in Qt Bridge default rather than inheriting the assembly-level setting.

Properties

Global

Apply export options globally

public bool Global { get; set; }

Property Value

bool
  • true if the options apply to all assemblies;
  • false (default) if the options apply only locally.

Remarks

Only relevant if attribute is defined for the root assembly. Ignored otherwise.

Options

Custom export options

public Options Options { get; set; }

Property Value

Options

Bitmask of Options flags