[Qt-qml] Getting a QML component to reload itself

Alex alexlordax+qt at gmail.com
Thu Sep 2 23:37:17 CEST 2010


Hi all,

I have several QML screens managed by a C++ application.  In some
cases, I need to reload a QML screen, in response to a signal emitted
from that screen.  On the C++ side I have a slot that does this:

currentView->setSource(currentView->source());

If this slot is invoked by a signal emitted on the C++ side,
everything works as expected.  However, if it is the QML screen itself
that emits the signal, I get a crash.

What is the correct way to do this?

Cheers,
Alex



More information about the Qt-qml mailing list