Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Create built-in quick component in C++

$
0
0
I need to create QQuickText in C++. I use this code: QQmlType *type = QQmlMetaType::qmlType("QtQuick/Text", 2, 0);   if (type)   {     QObject *obj = type->create();     QQuickItem *item = qobject_cast<QQuickItem*>(obj);     qDebug() << item;   } It work, but I had to include <private/qqmlmetatype_p.h>. There is another way?

Viewing all articles
Browse latest Browse all 4972

Trending Articles