QtCreator - show python or c++ based qml components in visual editor
Unsolved
Qt Creator and other tools
-
Is that possible to show python-based qml components in visual editor?
Lets assume I have following component:class QmlQImage(QQuickPaintedItem): def __init__(self, parent=None): super().__init__(parent) self.image_val = QImage() def get_image(self): return self.image_val def set_image(self, val): self.image_val = val image = Property(int, get_image, set_image) def paint(self, painter: PySide2.QtGui.QPainter): painter.drawImage(QRect(0, 0, painter.device().height(), painter.device().width()), self.image_val) qmlRegisterType(QmlQImage, 'QmlExt', 1, 0, 'QmlQImage')
and qml file
import QtQuick 2.0 import QmlExt 1.0 QmlQImage { width: 256; height: 256 }
When trying to edit that qml file I am observing following error:
Also, is that possible to display c++ based components in QML editor? If yes, can someone provide link how to achieve that?
Thanks in advance.