diff --git a/src/common/QskBoxBorderColors.cpp b/src/common/QskBoxBorderColors.cpp index 1b940215..c0a92f6e 100644 --- a/src/common/QskBoxBorderColors.cpp +++ b/src/common/QskBoxBorderColors.cpp @@ -12,6 +12,9 @@ static void qskRegisterBoxBorderColors() { qRegisterMetaType< QskBoxBorderColors >(); + + QMetaType::registerConverter< QColor, QskBoxBorderColors >( + []( const QColor& color ) { return QskBoxBorderColors( color ); } ); } Q_CONSTRUCTOR_FUNCTION( qskRegisterBoxBorderColors ) diff --git a/src/common/QskBoxBorderMetrics.cpp b/src/common/QskBoxBorderMetrics.cpp index 63e4622a..09d6138f 100644 --- a/src/common/QskBoxBorderMetrics.cpp +++ b/src/common/QskBoxBorderMetrics.cpp @@ -11,6 +11,15 @@ static void qskRegisterBoxBorderMetrics() { qRegisterMetaType< QskBoxBorderMetrics >(); + + QMetaType::registerConverter< QskMargins, QskBoxBorderMetrics >( + []( const QskMargins& margins ) { return QskBoxBorderMetrics( margins ); } ); + + QMetaType::registerConverter< int, QskBoxBorderMetrics >( + []( int width ) { return QskBoxBorderMetrics( width ); } ); + + QMetaType::registerConverter< qreal, QskBoxBorderMetrics >( + []( qreal width ) { return QskBoxBorderMetrics( width ); } ); } Q_CONSTRUCTOR_FUNCTION( qskRegisterBoxBorderMetrics ) diff --git a/src/common/QskBoxShapeMetrics.cpp b/src/common/QskBoxShapeMetrics.cpp index 0147cf17..f80261c5 100644 --- a/src/common/QskBoxShapeMetrics.cpp +++ b/src/common/QskBoxShapeMetrics.cpp @@ -13,6 +13,12 @@ static void qskRegisterBoxShapeMetrics() { qRegisterMetaType< QskBoxShapeMetrics >(); + + QMetaType::registerConverter< int, QskBoxShapeMetrics >( + []( int radius ) { return QskBoxShapeMetrics( radius ); } ); + + QMetaType::registerConverter< qreal, QskBoxShapeMetrics >( + []( qreal radius ) { return QskBoxShapeMetrics( radius ); } ); } Q_CONSTRUCTOR_FUNCTION( qskRegisterBoxShapeMetrics ) diff --git a/src/common/QskGradient.cpp b/src/common/QskGradient.cpp index 11f32af6..21d12da6 100644 --- a/src/common/QskGradient.cpp +++ b/src/common/QskGradient.cpp @@ -15,6 +15,9 @@ static void qskRegisterGradient() { qRegisterMetaType< QskGradient >(); qRegisterMetaType< QskGradientStop >(); + + QMetaType::registerConverter< QColor, QskGradient >( + []( const QColor& color ) { return QskGradient( color ); } ); } Q_CONSTRUCTOR_FUNCTION( qskRegisterGradient ) diff --git a/src/common/QskMetaInvokable.cpp b/src/common/QskMetaInvokable.cpp index ccfa9195..8630bbdd 100644 --- a/src/common/QskMetaInvokable.cpp +++ b/src/common/QskMetaInvokable.cpp @@ -16,6 +16,13 @@ QSK_QT_PRIVATE_BEGIN #include QSK_QT_PRIVATE_END +static void qskRegisterMetaInvokable() +{ + qRegisterMetaType< QskMetaInvokable >(); +} + +Q_CONSTRUCTOR_FUNCTION( qskRegisterMetaInvokable ) + static inline void *qskMetaTypeCreate( int type, const void *copy ) { #if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )