class Main(QObject):

    def __init__(self, parent=None):
        super().__init__(parent)
self.engine = QQmlApplicationEngine(self)
self.engine.load(QUrl.fromLocalFile('main.qml'))
self.window = self.engine.rootObjects()[0]
QQuickView only supports loading of root objects that derive from QQuickItem error?