Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlStringConverters Namespace Reference

Functions

Q_QML_PRIVATE_EXPORT QVariant variantFromString (const QString &, QMetaType preferredType, bool *ok=nullptr)
 
Q_QML_PRIVATE_EXPORT QVariant colorFromString (const QString &, bool *ok=nullptr)
 
Q_QML_PRIVATE_EXPORT unsigned rgbaFromString (const QString &, bool *ok=nullptr)
 
Q_QML_PRIVATE_EXPORT QPointF pointFFromString (const QString &, bool *ok=nullptr)
 
Q_QML_PRIVATE_EXPORT QSizeF sizeFFromString (const QString &, bool *ok=nullptr)
 
Q_QML_PRIVATE_EXPORT QRectF rectFFromString (const QString &, bool *ok=nullptr)
 

Function Documentation

◆ colorFromString()

QVariant QQmlStringConverters::colorFromString ( const QString s,
bool *  ok = nullptr 
)

Definition at line 56 of file qqmlstringconverters.cpp.

References QQmlColorProvider::colorFromString(), ok, and QQml_colorProvider().

Referenced by QtObject::color(), QtObject::colorEqual(), and colorVariantFromJSValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointFFromString()

QPointF QQmlStringConverters::pointFFromString ( const QString s,
bool *  ok = nullptr 
)

Definition at line 90 of file qqmlstringconverters.cpp.

References QStringView::left(), QStringView::mid(), ok, and QStringView::toDouble().

Referenced by variantFromString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rectFFromString()

QRectF QQmlStringConverters::rectFFromString ( const QString s,
bool *  ok = nullptr 
)

Definition at line 138 of file qqmlstringconverters.cpp.

References QStringView::left(), QStringView::mid(), ok, and QStringView::toDouble().

Referenced by variantFromString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rgbaFromString()

unsigned QQmlStringConverters::rgbaFromString ( const QString s,
bool *  ok = nullptr 
)

Definition at line 61 of file qqmlstringconverters.cpp.

References ok, QQml_colorProvider(), and QQmlColorProvider::rgbaFromString().

+ Here is the call graph for this function:

◆ sizeFFromString()

QSizeF QQmlStringConverters::sizeFFromString ( const QString s,
bool *  ok = nullptr 
)

Definition at line 114 of file qqmlstringconverters.cpp.

References QStringView::left(), QStringView::mid(), ok, and QStringView::toDouble().

Referenced by variantFromString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variantFromString()

QT_BEGIN_NAMESPACE QVariant QQmlStringConverters::variantFromString ( const QString s,
QMetaType  preferredType,
bool *  ok = nullptr 
)

Definition at line 15 of file qqmlstringconverters.cpp.

References QQmlValueTypeProvider::createValueType(), dateFromString(), dateTimeFromString(), QVariant::fromValue(), QMetaType::id(), ok, pointFFromString(), qRound(), rectFFromString(), ret, sizeFFromString(), and timeFromString().

Referenced by QQuickPropertyAnimationPrivate::convertVariant(), and QQmlPropertyPrivate::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: