You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- A shim trait is used to check whether the user declared a constructor
- This is implemented by the bridge if you add the constructor trait in bridge
- This will then allow you to implemented constructor for your type
- This prevents constructors not being used silently
-[Constructor](https://docs.rs/cxx-qt/latest/cxx_qt/trait.Constructor.html) - custom constructor. This must be declared in the bridge in order for you to implement it outside the bridge
27
27
-[Initialize](https://docs.rs/cxx-qt/latest/cxx_qt/trait.Initialize.html) - execute Rust code when the object is constructed, or as shorthand for an empty constructor
28
28
-[Threading](https://docs.rs/cxx-qt/latest/cxx_qt/trait.Threading.html) - marker trait whether CXX-Qt threading should be enabled
/// This trait can be implemented on any [CxxQtType] to define a
220
223
/// custom constructor in C++ for the QObject.
221
224
///
@@ -307,7 +310,7 @@ pub trait Threading: Sized {
307
310
///
308
311
/// If a QObject implements the `Initialize` trait, and the inner Rust struct is [Default]-constructible it will automatically implement `cxx_qt::Constructor<()>`.
309
312
/// Additionally, implementing `impl cxx_qt::Initialize` will act as shorthand for `cxx_qt::Constructor<()>`.
0 commit comments