Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qml file not found
Forum Updated to NodeBB v4.3 + New Features

Qml file not found

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raghaw
    wrote on 16 Dec 2013, 09:35 last edited by
    #1

    Hi,

    I have created a empty project in Qtcreator and then added one qml file into it along with one main.cpp and other .h and .cpp files.When i am trying Run it from Qtcreator everytime iam recievibg a blank window and in output message comes
    Starting C:\Users\emb-raghshu\build-TestProject-Desktop-Debug\debug\TestProject.exe...
    file:///C:/Users/emb-raghshu/build-TestProject-Desktop-Debug/app.qml: File not found
    C:\Users\emb-raghshu\build-TestProject-Desktop-Debug\debug\TestProject.exe exited with code 0"

    I know that qml file is not found by exe ..so i put app.qml in debug folder and ran exe from there the QML peice of code was running fine but again if i try running from QT creator again the same error as above i recieve.

    Pleasw help me out
    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 17 Dec 2013, 07:45 last edited by
      #2

      You can put the QML into a resource file (QRC), so that it is always being bundled together with the .exe. Or use a path that is relative (something like "../app.qml" should work in your case).

      (Z(:^

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kuschky
        wrote on 17 Dec 2013, 09:40 last edited by
        #3

        The C:/Users/emb-raghshu/build-TestProject-Desktop-Debug is your working directory.

        Your app is looking for the qml file in the working directory. But if you start the program the qml file ist still in your source directory.

        So place the qml file in the working directory or change the working directory in the project settings so that it points to the source directory.

        1 Reply Last reply
        0

        1/3

        16 Dec 2013, 09:35

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved