Results 1 to 2 of 2

Thread: Load a simple Page after the Main Page.

  1. #1
    Join Date
    Sep 2011
    Posts
    4
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Question Load a simple Page after the Main Page.

    Hi @ all,
    a simple question: after I create a new project in Qt Quick QML 4.7.xx (Windows & Symbian)
    I create two pages:

    MAINPAGE.qml
    MENU.qml


    how can I load MENU.qml or another Page in the same container of MainPage?

    I've find this function:

    Qt Code:
    1. function loadPage(qmlFileString) {
    2. //console.log("Load Page:"+ qmlFileString)
    3. var loadedComponent = Qt.createComponent(qmlFileString);
    4. if (loadedComponent.status == Component.Ready) {
    5. var loadedPage = loadedComponent.createObject(MainPage);
    6. }
    To copy to clipboard, switch view to plain text mode 

    but it cant load..

    Qt Code:
    1. Timer {
    2. interval: 2000; running: true; repeat: false;
    3. onTriggered: { loadPage("Menu.qml");
    4. }
    To copy to clipboard, switch view to plain text mode 

    nothing appear...always the same Main page (and if i view status in console log it can show me component it's not ready)

    Any idea how to do it?

    Thank in advance,
    mrhevor.
    Last edited by mrhevor; 26th September 2011 at 15:19.

  2. #2
    Join Date
    Sep 2011
    Posts
    4
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Thumbs up Re: Load a simple Page after the Main Page.

    This morning I've maked a lot of debug and this is the error:

    Load Page:Menu.qml
    error loading block component
    file:///C:/Users/me/Downloads/mySoft-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Debug/qml/mySoft/Menu.qml:3 plugin cannot be loaded for module "QtMobility.systeminfo": Cannot load library C:/QtSDK/Simulator/Qt/mingw/imports/QtMobility/systeminfo/declarative_systeminfod.dll: Impossibile trovare il modulo specificato.
    Can anyone help me to solve?


    Added after 58 minutes:


    Ok seems to be solved adding at file PRO this lines:

    CONFIG += mobility
    MOBILITY += multimedia

    Yes, this post can be closed with SOLVED.
    Last edited by mrhevor; 27th September 2011 at 10:44.

Similar Threads

  1. Can't load HTML page with QNetworkReply
    By T4ng10r in forum Qt Programming
    Replies: 2
    Last Post: 19th September 2011, 06:56
  2. QWebview fails to load page css on windows xp
    By marwyn in forum Qt Programming
    Replies: 16
    Last Post: 26th August 2011, 14:24
  3. webkit- Memory consumption increases per page load ?
    By Thành Viên Mới in forum Qt Programming
    Replies: 0
    Last Post: 1st June 2011, 09:55
  4. QWebView doesn't load a page on windows
    By RzuF in forum Qt Programming
    Replies: 3
    Last Post: 7th April 2011, 21:09
  5. Replies: 1
    Last Post: 24th March 2011, 16:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.