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

QML LS minor problems Nested Imports

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.9.0
    • None
    • QtCreator 16.0.0 or 16.0.1, Qt 6.9, macOS
    • Android, iOS/tvOS/watchOS, macOS

    Description

      This is a follow-up to QTBUG-126504 and other issues around Nested QML.
      In the meantime it's working well - thx to all working on this.

      Tested with QtC 16.0.0 and 16.0.1 and Qt 6.9.0
      verified qmlls configuration in QtC - all points to Qt 6.9.0

      I can use QML Types from any nested folder without the need to import folders as I did in 5.15.

      But in the QtC QML Editor some QML Types don't look like QML Types, they're colored like black Text - also hovering with mouse over the QML Type, nothing is displayed.

      example - structure of qml files:

      qml/
          Main.qml (import Ekke.Apps.Main)
          pages/
              HomePage.qml
          common/
              LabelBody.qml
              LabelTitle.qml
              FloatingActionButton.qml
              LabelSubheading.qml
          popups/
              AdminDialog.qml

      Using QML Types from same level or from root, all is ok:
          QML Type correct colored
          Hovering over the Type shows the Type name

      per ex. FloatingActionButton.qml
           --> LabelBody {} OK - see LabelBody_from_FAB.png


      ...

      Using QML Types from nested folders, there are some minor problems with:
      HomePage.qml
          --> AdminDialog {}
          --> FloatingActionButton {}
          --> LabelTitle {}

      AdminDialog.qml
          --> LabelTitle {}
          --> LabelSubheading {}

      per ex. LabelTitle in Homepage or AdminDialog:
      code assist correct lists LabelTitle, but color is black
      see LabelTitle_codeassist.png

      Using a not existing name, per ex. typing LabelTitlex instead of LabelTitle, the error was shown correct and even asked if "LabelTitle" was meant
      see LabelTitlex.png

      They are just minor cosmetic issues, but confusing if looking over the QML code - would be nice if that can be fixed too. THANKS again for all the great work you did to enable QML files in nested folders. This will enable me finally to port most of my projects to Qt 6 and CMake.

      Attachments

        1. LabelBody_from_FAB.png
          LabelBody_from_FAB.png
          40 kB
        2. LabelTitle_codeassist.png
          LabelTitle_codeassist.png
          60 kB
        3. LabelTitlex.png
          LabelTitlex.png
          24 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
            ekkescorner Ekkehard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes