Open jgirardet opened 4 years ago
I have the same error and fixed it by adding property var
in front of the extensions property. But even after that fix, I could get live coding to work. I made a change in a qml file and expected the app to update (similar to BrowserSync) but it did not. I must be missing something.
I´m stuck here too.
I´m just starting with Pyside+Qt+Qml so maybe there is an obvious solution but i just dont know.
So, what i notice so far:
Start with the same error as above:
QQmlApplicationEngine failed to load component file:///D:/programming/chest/live.qml:32:3: Type LiveCodingPanel unavailable file:///C:/Users/patri/AppData/Local/Programs/Python/Python38-32/lib/site-packages/livecoding/LiveCodingPanel.qml:220:5: Cannot assign to non-existent property "extensions"
in LiveCodingPanel.qml:220:5: u found this:
ProjectBrowser {
id: browser
projectPath: userProjectPath
extensions: ['qml', 'ui.qml']
}
ProjectBrowser
is a custom Component made on python side that are founded here:
projectbrowser.py
The property that are failing are there:
@Property('QStringList', notify=extensionsChanged)
def extensions(self):
return self._extensions
@extensions.setter
def extensions(self, value):
if self._extensions == value:
return
self._extensions = value
self.extensionsChanged.emit()
After messing around i noticed that none of this custom component properties are working. If u comment the property settings on the qml file u start to having error in other custom component properties. So maybe is Pyside that are not binding correctly the properties to the Qt/Qml side.
Not sure if this repo is still being maintained, and i´m still new on this stack so this is the further that i could go by now.
I gave up on this project. However, as it turns out, you can do this in Qt Creator. There is a project template called "Qt for Python - Qt Quick Application - Empty" that creates a pyslide2 qml application.
For live coding, use Build -> QML Preview.
Hi, from clean virtualenv with only pyside2 and python-qt-live-coding :
Have nive day Jimmy