Using "Design" mode in Qt Creator not working for me
I've been trying to get started with Qt Creator for Sailfish IDE (Qt Creator 4.8.1 (Sailfish SDK)). I've got a simple example program working: it builds and deploys on the emulator fine once I figured out how to switch build kits around -- and learning to start the project name with "harbour" -- and it acts as expected.
But I can't seem to activate the "Design" mode. At first the button was unclickable, but that was solved by enabling the Qt Quick|QML Designer plugin. Now it tries to start designer for a qml form, but I always get an error:
The executable of the QML emulation layer (QML Puppet) may not be responding. Switching to another kit might help.
I started off trying that suggestion, switching between the ARM and 486 kits but that doesn't seem to change the result. To further investigate -- based on suggestion on from a google search -- I opened Tools|Options|Qt Quick|Qt Quick Designer and switched back and forth between "Use fallback QML Emulation layer" and "Use QML layer emulation that is built with the selected Qt", restarting the IDE each time, but no change.
Then I noticed that when I open the Qt Quick Designer tab, both paths in the QML Emulation Layer box were shown in red text. That's never good, right? So I tried browsing for the fallback path -- in my case:
/home/rob/SailfishOS/libexec/qtcreator
It's there, all right, so I opened a file manager to make sure. Everything seems to be there, including qml2puppet. That's a clue, since QML Puppet was mentioned in the original error message. Okay, open a terminal there and run it. That produces the following error:
./qml2puppet: error while loading shared libraries: libicui18n.so.42: cannot open shared object file: No such file or directory
Another clue. Maybe libicui18n.so.42 is missing . . . lets try locating where that lives:
sudo updatedb; locate libicui18n
and the results:
/home/rob/.local/lib/python3.5/site-packages/PyQt5/Qt/lib/libicui18n.so.56
/home/rob/DVDFab/libicui18n.so.56
/home/rob/SailfishOS/lib/qtcreator/libicui18n.so
/home/rob/SailfishOS/lib/qtcreator/libicui18n.so.42
/home/rob/SailfishOS/lib/qtcreator/libicui18n.so.42.1
/usr/lib/i386-linux-gnu/libicui18n.so.55
/usr/lib/i386-linux-gnu/libicui18n.so.55.1
/usr/lib/x86_64-linux-gnu/libicui18n.so.55
/usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
There it is! It's in "/home/rob/SailfishOS/lib/qtcreator/" So back to the qtcreator director for more investigation. There's a file called qt.conf. Maybe that will help. It's contents:
[Paths]
Prefix=../../lib/Qt
Binaries=bin
Libraries=lib
Plugins=plugins
Imports=imports
Qml2Imports=qml
but the missing library is in
/home/rob/SailfishOS/lib/qtcreator/
not
/home/rob/SailfishOS/lib/Qt
so I backup and change qt.conf to:
[Paths]
Prefix=../../lib/qtcreator
Binaries=bin
Libraries=lib
Plugins=plugins
Imports=imports
Qml2Imports=qml
Restart the IDE again -- of course -- and the same error trying to switch to design mode.
I'm out of good ideas. Do I need to mess with other stuff in the qt.conf [paths]. Or is something wrong in the rest of my configuration? Do I have some leftover cruft from an old installation? Why are the paths in "QML Emulation Layer" in Option|Qt Quick|Qt Quick Designer dialog redded out?
Any help or suggestion would be most welcome. Thanks.
Edit: tried to upload a screenshot to illustrate the "redded out" text in the Qt Quick Settings Dialog, but insufficient karma as yet :(
Edit again: enough karma now for a screenshot . . .
here's the error:
and the settings dialog: