Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator lookin in the wrong place for QML files
Forum Updated to NodeBB v4.3 + New Features

Qt Creator lookin in the wrong place for QML files

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 8.4k 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.
  • S Offline
    S Offline
    scarleton
    wrote on last edited by
    #1

    I created my first real QML project with Qt Creator. It worked fine, code compiled and run without any issues. Then I modified the the .pro file to work in Visual Studio 2008 by add support for things like precompiled headers and a number of other things.

    After the modifications, the project will compile in both Qt Creator and within Visual Studio 2008. It runs fine from Visual Studio 2008, but not from Qt Creator. I get this error:

    file:///D:/MSDev/PhotoParata/Qt/Debug/qml/SalesCenter/main.qml: File not found

    Considering the project is here: D:\MSDev\PhotoParata\Qt\SalesCenter and the qml files are in D:\MSDev\PhotoParata\Qt\SalesCenter\qml\SalesCenter, I am guessing that there is some setting in the .pro fix the issue.

    Here is the .pro file:

    @# Add more folders to ship with the application, here
    folder_01.source = qml/SalesCenter
    folder_01.target = qml
    DEPLOYMENTFOLDERS = folder_01

    Additional import path used to resolve QML modules in Creator's code model

    QML_IMPORT_PATH =

    Avoid auto screen rotation

    #DEFINES += ORIENTATIONLOCK

    Needs to be defined for Symbian

    QT += sql
    CONFIG += debug_and_release
    DEFINES += QT_LARGEILE_SUPPORT QT_SQL_LIB _USE_32BIT_TIME_T NETWORKACCESS
    QTPLUGIN += qjpeg
    INCLUDEPATH += ./../../../../include ./GeneratedFiles .
    PRECOMPILED_HEADER = stdafx.h
    UI_DIR += ./GeneratedFiles
    RCC_DIR += ./GeneratedFiles

    CONFIG(debug, debug|release) {
    DESTDIR = ../Debug
    LIBS += -L../Debug
    OBJECTS_DIR += Debug
    MOC_DIR += ./GeneratedFiles/Debug
    INCLUDEPATH += ./GeneratedFiles/Debug
    } else {
    DESTDIR = ../Release
    LIBS += -L../Release
    OBJECTS_DIR += Release
    MOC_DIR += ./GeneratedFiles/Release
    INCLUDEPATH += ./GeneratedFiles/Release
    }

    symbian:TARGET.UID3 = 0xE46A320F

    Smart Installer package's UID

    This UID is from the protected range

    and therefore the package will fail to install if self-signed

    By default qmake uses the unprotected range value if unprotected UID is defined for the application

    and 0x2002CCCF value if protected UID is given to the application

    #symbian:DEPLOYMENT.installer_header = 0x2002CCCF

    Define QMLJSDEBUGGER to allow debugging of QML in debug builds

    (This might significantly increase build time)

    DEFINES += QMLJSDEBUGGER

    If your application uses the Qt Mobility libraries, uncomment

    the following lines and add the respective components to the

    MOBILITY variable.

    CONFIG += mobility

    MOBILITY +=

    The .cpp file which was generated for your project. Feel free to hack it.

    Please do not modify the following two lines. Required for deployment.

    include(qmlapplicationviewer/qmlapplicationviewer.pri)
    qtcAddDeployment()

    include(SalesCenter.pri)@

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xsacha
      wrote on last edited by
      #2

      You don't copy the qml files to the Debug or Release dir and since your compiled file is always in either Debug or Release, you probably should account for that?
      Maybe ../qml/SalesCenter or add the directory in the CONFIG section.

      • Sacha
      1 Reply Last reply
      0
      • S Offline
        S Offline
        scarleton
        wrote on last edited by
        #3

        Before I made changes, Qt Creator was didn't have path issues running the app, but now it does. The question is why:

        Is it because Qt Creator was coping the files and now isn't?

        Is it because Qt Creator was changing or setting some path variable and now isn't?

        Is it something else?

        Obviously there is something that changed in the .pro file, the only question is how do I correct it?

        Sam

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xsacha
          wrote on last edited by
          #4

          It's because you now have a Debug and Release dir set up.

          file:///D:/MSDev/PhotoParata/Qt/Debug/qml/SalesCenter/main.qml: File not found

          Previously it would have looked for D:/MSDev/PhotoParata/Qt/qml/SalesCenter/main.qml

          Because the source says: folder_01.source = qml/SalesCenter

          • Sacha
          1 Reply Last reply
          0
          • S Offline
            S Offline
            scarleton
            wrote on last edited by
            #5

            So, how do I fix this? I tried commenting out both the DESTDIR and the LIBS, but now it won't compile in Qt Creator. The goal is to create a .pro file that will work with both development environments. Sorry Nokia, VS2008 simply has way too many features for C++ not to use it, besides, I still have not figured out how to get Qt Creator to debug the code.

            1 Reply Last reply
            0

            • Login

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