Home > other >  module "QtQuick.XmlListModel" is not installed?
module "QtQuick.XmlListModel" is not installed?

Time:10-18

I use PyQt6 and try run some qml app,It throw out module "QtQuick.XmlListModel" is not installed errors ?

Name: PyQt6
Version: 6.2.0
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: [email protected]
License: GPL v3
Location: c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages
Requires: PyQt6-Qt6, PyQt6-sip
Required-by:

Code Snippet

import QtQuick 2.12
import QtQuick.XmlListModel 2.12

CodePudding user response:

In Qt6, XmlListModel was moved from QtQuick to QtQml as indicated in the docs so you must change to:

import QtQuick
import QtQml.XmlListModel

Note: In Qt6 you should not indicate the versions of the modules.

  • Related