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. Qt6: the Qt.labs.qmlmodels library is not imported.
Forum Updated to NodeBB v4.3 + New Features

Qt6: the Qt.labs.qmlmodels library is not imported.

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 2 Posters 296 Views 1 Watching
  • 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.
  • W Offline
    W Offline
    woodpecker
    wrote on last edited by
    #1

    Hello.
    I'm trying to write "import Qt.labs.qmlmodels 1.0(6.0)" at the beginning of the qml file, but the drop-down list doesn't include the qmlmodels library, only the following libraries: calendar, folderlistmodel, platform, settings, websockets.
    I checked: the libQt6QmlModels.so.6.8.2 library exists in the Qt_installed_path/lib folder.
    How do I add this library?
    Thanks in advance!

    JKSHJ 1 Reply Last reply
    0
    • W Offline
      W Offline
      woodpecker
      wrote on last edited by
      #2

      The documentation for Qt 6.9 says that it should be imported:
      https://doc.qt.io/qt-6/qt-labs-qmlmodels-qmlmodule.html.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        woodpecker
        wrote on last edited by
        #3

        libQt6LabsQmlModels.so.6.8.2 exists as well.

        1 Reply Last reply
        0
        • W woodpecker

          Hello.
          I'm trying to write "import Qt.labs.qmlmodels 1.0(6.0)" at the beginning of the qml file, but the drop-down list doesn't include the qmlmodels library, only the following libraries: calendar, folderlistmodel, platform, settings, websockets.
          I checked: the libQt6QmlModels.so.6.8.2 library exists in the Qt_installed_path/lib folder.
          How do I add this library?
          Thanks in advance!

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @woodpecker said in Qt6: the Qt.labs.qmlmodels library is not imported.:

          the drop-down list doesn't include the qmlmodels library, only the following libraries: calendar, folderlistmodel, platform, settings, websockets.

          The auto-completer might not see the module for some reason, but you can type it out manually. Does that work?

          "import Qt.labs.qmlmodels 1.0(6.0)"

          We recommend omitting the version number. Just write import Qt.labs.qmlmodels

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          W 1 Reply Last reply
          1
          • JKSHJ JKSH

            @woodpecker said in Qt6: the Qt.labs.qmlmodels library is not imported.:

            the drop-down list doesn't include the qmlmodels library, only the following libraries: calendar, folderlistmodel, platform, settings, websockets.

            The auto-completer might not see the module for some reason, but you can type it out manually. Does that work?

            "import Qt.labs.qmlmodels 1.0(6.0)"

            We recommend omitting the version number. Just write import Qt.labs.qmlmodels

            W Offline
            W Offline
            woodpecker
            wrote on last edited by
            #5

            @JKSH said in Qt6: the Qt.labs.qmlmodels library is not imported.:

            The auto-completer might not see the module for some reason, but you can type it out manually. Does that work?

            Yes, it works!
            The TableModelColumn now has syntax highlighting!
            Thank you very much!

            @JKSH said in Qt6: the Qt.labs.qmlmodels library is not imported.:

            We recommend omitting the version number. Just write import Qt.labs.qmlmodels

            Fixed it.

            1 Reply Last reply
            0
            • W woodpecker has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved