I'm a beginner and thought that writing apps in QT Creator will be as easy as working with vanilla Python in VSCode & installing packages to venv with pip. Sadly that's not in case.
I want to create a desktop app in Qt Quick with charts, plots and animations. I downloaded the QT online installer and chose the following installation template:

Then, in the QT Maintenance application, I ticked the 'QTCharts' box under QT/6.6.2/Additional Libraries and installed it.
I created a new Project in QT Creator with an empty QT Quick window. Launched it, it worked (why wouldn't it?). I then added the import statement for QTCharts in the main.qml file:
import QtQuick
import QtQuick.Window
import QtCharts
Window {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
}
but when I ran it via the QT Creator UI, it simply logged: '\venv\Scripts\python.exe exited with code -1'. Surprised by the lack of details, I ran the app via cmd which outputted more information:
"main.qml:3:1: module "QtCharts" is not installed".
Quick google led me to adding the following:
engine.addImportPath("C:\Qt\\6.6.2\mingw_64\qml")
to the main.py file. This resulted in yet another error:
main.qml:3:1: Cannot load library C:\Qt\6.6.2\mingw_64\qml\QtCharts\qtchartsqml2plugin.dll: The specified module could not be found.
but the file does indeed exist:

so this made me stop. I'm not doing it right, there should be an easier way. I've got many libraries to install, some external ones too, so I need to know a straightforward way of adding them to my project. Please, could anyone explain what I'm doing wrong?
Windows 10, Python 3.11


You cannot use c++ binary in python unless it's binary compatible with python. c++ library is binary compatible with python if its build with same compiler that python was build. As far as I know Qt does not ship python and "Qt for python" uses whatever python that is found on user machine, so there's no way to ship binaries compatible with this python using maintenance tool. It's easy and natural to use python tooling to ship this binaries, which they do.
When you create new "Qt for python" project in creator, it runs
python.exe -m pip install PySide6in virtual environment.PySide6depends onPySide6-AddonsandPySide6-Essentials, so command installs all binaries, bindings and plugins, including QtCharts qml plugin<venv-root>\Lib\site-packages\PySide6\qml\QtCharts\qtchartsqml2plugin.dll. You can see log of this command inGeneral Messagestab in qtcreator.PySide6 is self-contained within this venv and does not depend on anything outside.
To configure python associated with Qt go to
Edit -> Preferences -> Pythonin qtcreator.To verify that qml charts actually work you can run polarchart pyside qml example, which you can clone from pyside repository
git clone --depth 1 git://code.qt.io/pyside/pyside-setup.git(pyside-setup\examples\charts\qmlpolarchart)