[Qt-qml] Setting the source with a click on QML component

Girish Ramakrishnan girish at forwardbias.in
Fri Sep 30 11:02:39 CEST 2011


Hi,
If you make your top level item a Loader, you can just change the
source of the Loader.

Something like,
main.qml: Loader{ id: loader; source: "clicker.qml" }
clicker.qml: Rectange { .. MouseArea { onClicked: loader.source =
"another.qml" } }

Girish

On Fri, Sep 30, 2011 at 2:22 PM, Bartosh Wroblevksy <bartosh at live.com> wrote:
> Hi,
> So here's an interesting problem. Do you think it is possible to have a
> click on a QML inside a QDeclarativeView have the QDeclarativeView load a
> new QML file?
> Bartosh
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
>


More information about the Qt-qml mailing list