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. qtcreator not showing my QML files in Projects list

qtcreator not showing my QML files in Projects list

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 1.5k Views
  • 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.
  • Tom assoT Offline
    Tom assoT Offline
    Tom asso
    wrote on last edited by
    #1

    My project’s qml files are not displayed in qtcreator’s Projects list. Files myproject.pro, qml.qrc and main.qml are all in the top-level directory of my project. myproject.pro includes “RESOURCES += qml.qrc”

    All files specified by qml.qrc including .qml files do exist:

    <RCC>
        <qresource prefix="/">
            <file>main.qml</file>
            <file>qtquickcontrols2.conf</file>
            <file>bathymetry.bmp</file>
            <file>ui-components/Settings2dWindow.qml</file>
            <file>ui-components/Settings3dWindow.qml</file>
            <file>ui-components/Popup.qml</file>
            <file>shaders/simple.vert</file>
            <file>shaders/simple.frag</file>
            <file>shaders/shader.vert</file>
            <file>shaders/shader.frag</file>
            <file>shaders/test.frag</file>
            <file>shaders/test.vert</file>
        </qresource>
    </RCC>
    

    Full myproject.pro at end of post.
    What am I missing?

    Qt Creator 4.11.1 based on Qt 5.14.1 Qt 5.13.1 OS: Ubuntu 18.04.3

    Thanks,
    Tom

    QT += quick
    QT += opengl
    CONFIG += c++11
    
    # The following define makes your compiler emit warnings if you use
    # any Qt feature that has been marked deprecated (the exact warnings
    # depend on your compiler). Refer to the documentation for the
    # deprecated API to know how to port your code away from it.
    DEFINES += QT_DEPRECATED_WARNINGS
    
    # You can also make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    # You can also select to disable deprecated APIs only up to a certain version of Qt.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += \
            main.cpp \
        backend.cpp \
        squircle.cpp \
        Topography.cpp
    
    RESOURCES += qml.qrc
    
    # Additional import path used to resolve QML modules in Qt Creator's code model
    QML_IMPORT_PATH =
    
    # Additional import path used to resolve QML modules just for Qt Quick Designer
    QML_DESIGNER_IMPORT_PATH =
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    HEADERS += \
        backend.h \
        squircle.h \
        Topography.h \
        Vertex.h
    
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lmbaux
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lmbaux
    else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lmbaux
    
    INCLUDEPATH += $$PWD/../../../../../../usr/local/include
    DEPENDPATH += $$PWD/../../../../../../usr/local/include
    
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lgmt
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lgmt
    else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lgmt
    
    INCLUDEPATH += $$PWD/../../../../../../usr/local/include
    DEPENDPATH += $$PWD/../../../../../../usr/local/include
    
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lmbview
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lmbview
    else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lmbview
    
    INCLUDEPATH += $$PWD/../../../../../../usr/local/include
    DEPENDPATH += $$PWD/../../../../../../usr/local/include
    
    
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lmbio
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lmbio
    else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lmbio
    
    INCLUDEPATH += $$PWD/../../../../../../usr/local/include
    DEPENDPATH += $$PWD/../../../../../../usr/local/include
    
    win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/release/libmbio.a
    else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/debug/libmbio.a
    else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/release/mbio.lib
    else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/debug/mbio.lib
    else:unix: PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/libmbio.a
    
    
    Tom assoT 1 Reply Last reply
    0
    • Tom assoT Tom asso

      My project’s qml files are not displayed in qtcreator’s Projects list. Files myproject.pro, qml.qrc and main.qml are all in the top-level directory of my project. myproject.pro includes “RESOURCES += qml.qrc”

      All files specified by qml.qrc including .qml files do exist:

      <RCC>
          <qresource prefix="/">
              <file>main.qml</file>
              <file>qtquickcontrols2.conf</file>
              <file>bathymetry.bmp</file>
              <file>ui-components/Settings2dWindow.qml</file>
              <file>ui-components/Settings3dWindow.qml</file>
              <file>ui-components/Popup.qml</file>
              <file>shaders/simple.vert</file>
              <file>shaders/simple.frag</file>
              <file>shaders/shader.vert</file>
              <file>shaders/shader.frag</file>
              <file>shaders/test.frag</file>
              <file>shaders/test.vert</file>
          </qresource>
      </RCC>
      

      Full myproject.pro at end of post.
      What am I missing?

      Qt Creator 4.11.1 based on Qt 5.14.1 Qt 5.13.1 OS: Ubuntu 18.04.3

      Thanks,
      Tom

      QT += quick
      QT += opengl
      CONFIG += c++11
      
      # The following define makes your compiler emit warnings if you use
      # any Qt feature that has been marked deprecated (the exact warnings
      # depend on your compiler). Refer to the documentation for the
      # deprecated API to know how to port your code away from it.
      DEFINES += QT_DEPRECATED_WARNINGS
      
      # You can also make your code fail to compile if it uses deprecated APIs.
      # In order to do so, uncomment the following line.
      # You can also select to disable deprecated APIs only up to a certain version of Qt.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      SOURCES += \
              main.cpp \
          backend.cpp \
          squircle.cpp \
          Topography.cpp
      
      RESOURCES += qml.qrc
      
      # Additional import path used to resolve QML modules in Qt Creator's code model
      QML_IMPORT_PATH =
      
      # Additional import path used to resolve QML modules just for Qt Quick Designer
      QML_DESIGNER_IMPORT_PATH =
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      HEADERS += \
          backend.h \
          squircle.h \
          Topography.h \
          Vertex.h
      
      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lmbaux
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lmbaux
      else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lmbaux
      
      INCLUDEPATH += $$PWD/../../../../../../usr/local/include
      DEPENDPATH += $$PWD/../../../../../../usr/local/include
      
      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lgmt
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lgmt
      else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lgmt
      
      INCLUDEPATH += $$PWD/../../../../../../usr/local/include
      DEPENDPATH += $$PWD/../../../../../../usr/local/include
      
      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lmbview
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lmbview
      else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lmbview
      
      INCLUDEPATH += $$PWD/../../../../../../usr/local/include
      DEPENDPATH += $$PWD/../../../../../../usr/local/include
      
      
      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/release/ -lmbio
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/lib/debug/ -lmbio
      else:unix: LIBS += -L$$PWD/../../../../../../usr/local/lib/ -lmbio
      
      INCLUDEPATH += $$PWD/../../../../../../usr/local/include
      DEPENDPATH += $$PWD/../../../../../../usr/local/include
      
      win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/release/libmbio.a
      else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/debug/libmbio.a
      else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/release/mbio.lib
      else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/debug/mbio.lib
      else:unix: PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/lib/libmbio.a
      
      
      Tom assoT Offline
      Tom assoT Offline
      Tom asso
      wrote on last edited by
      #2

      Added this line to myproject.pro and now the QML folder shows up in the Projects list, containing those three files:

      RESOURCES += main.qml Page1Form.ui.qml Page2Form.ui.qml
      
      

      Yet these files are already in qml.qrc, which is already listed in myproject.pro - why must I add them manually?

      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