当前位置:首页 > 算法工程 2019年11月13日
Qt 中 Qt(c++)类型 对应 QtQuick(qml)类型

Basic Qt Data Types

By default, QML recognizes the following Qt data types, which are automatically converted to a corresponding QML basic type when passed from C++ to QML and vice-versa:


Qt Type

QML Basic Type

bool

bool

unsigned int, int

int

double

double

float, qreal

real

QString

string

QUrl

url

QColor

color

QFont

font

QDate

date

QPoint, QPointF

point

QSize, QSizeF

size

QRect, QRectF

rect

QMatrix4x4

matrix4x4

QQuaternion

quaternion

QVector2D, QVector3D, QVector4D

vector2d, vector3d, vector4d

Enums declared with Q_ENUM() or Q_ENUMS()

enumeration


左边是Qt c++类型 对应右边Qt qml类型


发表评论: