Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96802

qml runtime custom config: PartialScene.container doesn't work well if it's not a full path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 5.15.6, 6.2.0 RC
    • QML: Tooling
    • None

      It's always been that way: if you try to use a relative path there, it will try to load the container QML from the current working directory rather than from the directory containing the config file.

      ~/expt/qtquick   Qt 6.3.0 in /home/rutledge/dev/qt6-dbg/qtbase  
      [zen][21:10:28] qml -c simplest text.qml
      [     0.000 W] default QQmlComponentPrivate::beginCreate - QQmlComponent: Component is not ready: QUrl("file:///home/rutledge/online/expt/qtquick/ItemWrapper.qml")
      qml: Did not load any objects, exiting.
      
      ~/expt/qtquick   Qt 6.3.0 in /home/rutledge/dev/qt6-dbg/qtbase  
      [zen][21:14:21] cat ~/.config/QtProject/Qml\ Runtime/simplest/configuration.qml 
          import QmlRuntime.Config 1.0
      
          Configuration {
              PartialScene {
                  itemType: "QQuickItem"
                  container: "ItemWrapper.qml"
              }
          }
      

      (to be able to see even this much information requires fixing QTBUG-96801 first)

      ItemWrapper.qml is in ~/.config/QtProject/Qml Runtime/simplest/ , alongside the configuration.qml file. That's the most intuitive place to put it.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            srutledg Shawn Rutledge
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes