Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29793

QtCreator does not support legacy behaviors with respect to importing qml files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 11.0.3
    • Quick / QML Support
    • None
    • Windows

    Description

      I'm new to Qt Creator and having issues with what I feel is a very simple task.
      I wish to import qml files in a subdirectory of my project using the documented

       import "relativePathToFile"

      technique.

      I'm following along with this specific youtube tutorial:
      link Lets ReCreate Tesla UI in Qt and QML 

      This tutorial is using an older Qt5.x based QtCreator, but I am able to generate a empty screen app and create a "bottomBar" widget successfully.

      Then the tutorial shows how to cut/paste this widget into a seperate qml file called "BottomBar.qml" and this file is placed in a directory relative to the main project at the relative path:
      "./ui/BottomBar".

      I am able to get the compiler to accept this, but when I attempt to run, the loader cannot find this referenced qml object.  In looking at the "Generated Files" the relative path qml file did not get copied/generated into this "shadow" project.  

      I'm currently on the trail of how to get this to work, as I want to prototype some GUI's and would like to have relative paths to the various panes of the GUI as I develop it.

      This seems like a very simple thing that is broken. .

      I have attached a screen shot and a small project illustrating the problem.

      The build system somehow is failling to capture and transfer these relative dependencies.

      Attachments

        1. QtDemo4.zip
          95 kB
        2. RuntimeError.jpg
          RuntimeError.jpg
          111 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            ross.youngblood Ross Youngblood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes