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

QtQuick: Library import requires a version

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.2
    • Quick: Layouts
    • None
    • Debian 10.13
      Qt 6.5.2
      Qt Design Studio 4.2.0
    • Linux/X11

    Description

      I've created a new .qml file in Qt Design Studio which implements a Frame containing a StackLayout with some more elements in it.

      For this some imports are required. So the file begins with the lines

      "import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Layouts
      import QtQuick.Studio.Components 1.0"

       

      This is correct syntax according to the documentation.

      Nevertheless when trying to start the preview then nothing happens except the error message:

      "QQmlApplicationEngine failed to load component
      file:///home/prh/projects/QmlTest/content/ChangeableFrame.qml: Library import requires a version
      QThread: Destroyed while thread is still running"

       

      Then I tried to give the third line a version but neither of "2", "2.15", "1", "1.0" is accepted:

      "plugin cannot be loaded for module "QtQuick.Layouts": Cannot protect module QtQuick.Layouts 2 as it was never registered" or 

      "module "QtQuick.Studio.Components" is not installed" respectively.

      With lots of trying around I found out that version 1.15 works. But I didn't find a documentation or anything to determine the correct number. 

      So:

      1. Correct syntax is not accepted by the parser.
      2. If I really wanted to provide a version number, then how would I normally find out the correct version?

       

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            cyril Harald Prasser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes