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

Basic QQuickitem in a QQuickWindow

$
0
0
Hi guys, QGuiApplication app( argc, argv );         QQuickWindow window;     QQmlEngine engine;     QQmlComponent component(&engine, QUrl::fromLocalFile(QLatin1String("qml/main.qml")));       QQuickItem *item = qobject_cast<QQuickItem*>(component.create());     item->setParentItem(window.contentItem());     qDebug() << item;       window.show();         return app.exec() The following code wont run correctly. I get a blank window even though my qquickitem is an item that fills the parent and has a rectangle? An ideas?

Viewing all articles
Browse latest Browse all 4972

Trending Articles