Qt6: the Qt.labs.qmlmodels library is not imported.
-
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! -
The documentation for Qt 6.9 says that it should be imported:
https://doc.qt.io/qt-6/qt-labs-qmlmodels-qmlmodule.html. -
libQt6LabsQmlModels.so.6.8.2 exists as well.
-
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!@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 -
@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@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!
TheTableModelColumnnow 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.
-
W woodpecker has marked this topic as solved on