Loading QML files inside QmlElement
-
(I'm using Qt for Python - Pyside6)
What I want to achieve is the following:
The main application only loads a main.qml file. In the main.qml I want to specify a QmlElement like CustomComponent01.
This Custom component should consist of a .qml file itself. This works fine when CustomComponent01 is only a .qml file itself however, I couldn't get it to work using a python class that loads the .qml file. My problem here is not that I can't get QML to recognize my python file (this works fine) but I couldn't figure out how to load the components in python and add them to my class (that I inherited from QWidget). I tried using QQmlComponent but didn't really figure out how that is supposed to work.