QML Live + harbour-hydrogen

As someone noticed, some Sailfish OS users met in Bucharest the other day to improve harbour hydrogen.

Initially, the idea was to use QML Live to facilitate the work and have a nice workflow when testing new stuff. Unfortunately, I got it working a few minutes only on my X10-2. It changed as expected and because there are some python code inside, I thought it may be useful to disable it. Once I committed these changes, QML Live stopped to work. Even with the previous code.

My question is: what happened? Did I broke something? Or do I something wrong? I’ll be really glad if someone could test it and give me some hints, so I have a working QML Live on my machine.

If you want to test, I pushed the needed code on my repository. To get harbour-hydrogen, you need to execute these commands after you cloned the repository:

cd hydrogen
yarn install --cache-folder .yarn-cache --prefer-offline
yarn build

Once you’re ready, build the project and install harbour-hydrogen on your device. You may do it twice, as the first time, there should be no files and so no hydrogen directory. Once you get all files on your phone, start manually the server with this command:

cd /usr/share/harbour-hydrogen/hydrogen
python3 -m http.server 27834

Thanks in advance!

1 Like

My experience with python and qml live is that you have redeploy. I have, I believe falsely, tried reloading the QML file where python is included to force reloading python. But I don’t think that works reliably. I’ll try the hydrogen build.

In any case, generally where I have a bit of python, I just redeploy. QMLLIVE is good for JS testing and QML layout stuff.