[Interest] Accessing QML Loader from C++

Curtis Mitch mitch.curtis at theqtcompany.com
Sun Aug 23 10:34:11 CEST 2015


From: interest-bounces+mitch.curtis=theqtcompany.com at qt-project.org <interest-bounces+mitch.curtis=theqtcompany.com at qt-project.org> on behalf of mark diener <rpzrpzrpz at gmail.com>
Sent: Sunday, 23 August 2015 05:40
To: interest at qt-project.org
Subject: [Interest] Accessing QML Loader from C++

Hello List:

Does anybody have an idea on how to retrieve the QObject* from C++
with a QML Loader::item property?

[snip]

I'm not sure about the rest of your questions. Assuming I'm understanding this one correctly, you can do it like this:

QObject *item = loader->property("item").value<QObject*>();

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150823/f2aaa0e0/attachment.html>


More information about the Interest mailing list