Skip to content

can"t make it run #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jgirardet opened this issue Jan 7, 2020 · 3 comments
Open

can"t make it run #8

jgirardet opened this issue Jan 7, 2020 · 3 comments

Comments

@jgirardet
Copy link

Hi,
from clean virtualenv with only pyside2 and python-qt-live-coding :

^C(.venv) jimmy@cacahuete:~/tras/python-qt-live-coding$ python_qt_live_coding examples
Error importing standalone/module: No module named 'standalone/module'
QQmlApplicationEngine failed to load component
file:///home/jimmy/tras/.venv/lib/python3.7/site-packages/livecoding/live.qml:31 Type LiveCodingPanel unavailable
file:///home/jimmy/tras/.venv/lib/python3.7/site-packages/livecoding/LiveCodingPanel.qml:220 Cannot assign to non-existent property "extensions"

^C(.venv) jimmy@cacahuete:~/tras/python-qt-live-coding$ python_qt_live_coding examples/standalone
QQmlApplicationEngine failed to load component
file:///home/jimmy/tras/.venv/lib/python3.7/site-packages/livecoding/live.qml:31 Type LiveCodingPanel unavailable
file:///home/jimmy/tras/.venv/lib/python3.7/site-packages/livecoding/LiveCodingPanel.qml:220 Cannot assign to non-existent property "extensions"

Have nive day
Jimmy

@asaladino
Copy link

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.

@SrMordred
Copy link

SrMordred commented Sep 28, 2020

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.

@asaladino
Copy link

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.

qtcreator

For live coding, use Build -> QML Preview.

qmlpreview

ashwoods added a commit to ashwoods/python-qt-live-coding that referenced this issue Nov 6, 2020
While using PySide2 and due to bug PYSIDE-9000: https://bugreports.qt.io/browse/PYSIDE-900
having two methods with the same name breaks the Qt registering process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants