Results 1 to 1 of 1

Thread: main-window never shows up when I import desktop-components from a resource-file

  1. #1
    Join Date
    May 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question main-window never shows up when I import desktop-components from a resource-file

    Project description:
    My qml-desktop-applications uses the Qt Quick components for Desktop.

    I compile all files from the desktop-components into a resource-file (which is embedded in the .exe-file).
    The main.qml-file is loaded from the resources like this:

    Qt Code:
    1. viewer.setSource(QUrl("qrc:/main.qml"));
    To copy to clipboard, switch view to plain text mode 

    main.qml starts with this line which seems to make trouble:

    Qt Code:
    1. import "desktop-components/components"
    To copy to clipboard, switch view to plain text mode 

    Observed behaviour:

    • When I compile and execute the application everything works fine
    • When I move my application to another directory (or PC), the application's main window never shows up.
    • When I remove all desktop-components stuff and just define a simple Rectangle in main.qml it works.
    • When I load the qml-file (and therefore the desktop-components from the file-system instead of the resource-file it works (viewer.setSource(QUrl("main.qml"));
    • The problem doesn't occur when building my project for debug
    • The problem doesn't occur on OSX


    Project file-structure:
    MyProject
    |- release
    | |- MyProject.exe
    |
    |- desktop-components
    | |- components
    |
    |- main.qml
    |
    |- qmlapplicationviewer
    Last edited by Hedge; 21st May 2011 at 22:52.

Similar Threads

  1. Replies: 2
    Last Post: 8th February 2011, 11:49
  2. Replies: 0
    Last Post: 29th July 2010, 08:15
  3. Replies: 5
    Last Post: 31st January 2009, 07:36
  4. Program that just shows a window
    By claudio-cit in forum Newbie
    Replies: 2
    Last Post: 5th July 2008, 09:55
  5. Replies: 4
    Last Post: 19th May 2007, 14:10

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.