<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Error on startup for QML app on MeeGo]]></title><description><![CDATA[<p dir="auto">Hi all.<br />
I'm trying to port my QML app on Meego. When testing it on the simulator all works, but when I try to launch it on the meego emulator, it installed fine, but then I obtain the following error:<br />
@QObject: Cannot create children for a parent that is in a different thread.<br />
(Parent is QIcdEngine(0x1fb71100), parent's thread is QThread(0x1fb6f5e8), current thread is QThread(0x1f588318)@</p>
<p dir="auto">Is there someone that can point me on the right direction? The app start with a QML spalshscreen with a loader that load the main app as described in a nokia developer wiki page (<a href="http://www.developer.nokia.com/Community/Wiki/Implementing_a_Splash_Screen_with_Qt_Quick#Pure_QML_approach" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.developer.nokia.com/Community/Wiki/Implementing_a_Splash_Screen_with_Qt_Quick#Pure_QML_approach</a>).<br />
After this the main app is showed.<br />
If I remove the spashscreen the app seems to start correctly.<br />
This is the splashscreen nad loader code:</p>
<p dir="auto">AppLoader.qml (the file called from the main.cpp)<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/import">@<bdi>import</bdi></a> QtQuick 1.1</p>
<p dir="auto">Item {<br />
id: mainAppLoaderItem</p>
<pre><code>property bool splashScreenCanBeClosed: false

// Loaders for the main application and the splash screen.
Loader {
    id: mainAppLoader
    width: mainAppLoaderItem.width
    height: mainAppLoaderItem.height
}

Loader {
    id: splashScreenLoader
    source: Qt.resolvedUrl("SplashScreen.qml");
    width: mainAppLoaderItem.width
    height: mainAppLoaderItem.height
}

// Timers for starting to load the main application and eventually deleting
// the splash screen.
Timer {
    id: firstPhaseTimer
    property int phase: 0
    interval: 50
    running: true
    repeat: false

    onTriggered: {
        if(!mainAppLoader.Loading) {
            mainAppLoader.source = Qt.resolvedUrl("AppMainWin.qml");
            secondPhaseTimer.start();
        }
    }
}

Timer {
    id: secondPhaseTimer
    property int phase: 0
    interval: 800
    running: false
    repeat: true

    onTriggered: {
        if (phase == 0) {
            if(mainAppLoader.Loading) {
                return;
            }
            // Set the phase for deletion.
            phase += 1;
        }
        else if(phase == 1) {
            if(!splashScreenCanBeClosed)
                return;

            // Hide the splash screen.
            if(splashScreenLoader.item) {
                splashScreenLoader.item.opacity = 0;
            }

            phase += 1;
        }
        else {
            // By setting the source property to an empty string destroys
            // the loaded item.
            splashScreenLoader.source = "";

            secondPhaseTimer.stop();
        }
    }
}
</code></pre>
<p dir="auto">}@</p>
<p dir="auto">Splascreen.qml<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/import">@<bdi>import</bdi></a> QtQuick 1.1</p>
<p dir="auto">Item {<br />
id: splashScreen</p>
<pre><code>z: 150

Rectangle {
    color: "#1D3652"
    anchors.fill: parent
}

Item {
    anchors {
        top: parent.top
        right: parent.right
        rightMargin: 10
        topMargin: 10
    }
    width: 30
    height: 30

    visible: splashScreen.opacity == 1

    Image {
        anchors.centerIn: parent
        fillMode: Image.PreserveAspectFit
        source: "qrc:images/close.svg"
        sourceSize.height: parent.height - 10
        smooth: true
    }

    MouseArea {
        anchors.fill: parent
        onClicked: Qt.quit()
    }
}

Item {
    id: appLogo
    anchors.centerIn: parent
    height: childrenRect.height

    Image {
        id: appIcon
        anchors.horizontalCenter: parent.horizontalCenter
        sourceSize.width: 100
        fillMode: Image.PreserveAspectFit
        smooth: true
        source: "qrc:images/icon.svg"
    }

    Image {
        id: appName
        anchors.top: appIcon.bottom
        anchors.horizontalCenter: parent.horizontalCenter
        source: "qrc:images/app_banner.png"
    }
}

Image {
    anchors {
        top: appLogo.bottom
        topMargin: splashScreen.width &gt; splashScreen.height ? 30 : 50
        horizontalCenter: parent.horizontalCenter
    }

    scale: 0.8

    source: "qrc:images/loadingapp.png"
    visible: splashScreen.opacity == 1

    NumberAnimation on rotation {
        running: splashScreen.opacity == 1
        from: 0
        to: 360
        loops: Animation.Infinite
        duration: 1200
    }
}

Text {
    anchors {
        bottom: parent.bottom
        right: parent.right
        bottomMargin: 5
        rightMargin: 5
    }
    ...
}

Behavior on opacity {
    NumberAnimation {
        duration: 800
    }
}
</code></pre>
<p dir="auto">}<br />
@</p>
]]></description><link>https://forum.qt.io/topic/20226/error-on-startup-for-qml-app-on-meego</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 14:11:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/20226.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Sep 2012 12:25:10 GMT</pubDate><ttl>60</ttl></channel></rss>