I’m working on an embedded system. The directory /root/txpa/images/current/application/bin contains the file qt.conf, the content of which looks like this:
[Paths]
Prefix=/qtdir
Libraries=/qtdir/lib
/qtdir/lib/fonts is about the only thing in the path, and it contains several fonts of kind Vera. These are the only fonts in the system, and the app itself doesn’t use them directly. Qt does.
I’ve been asked to remove qt.conf from its current directory, but if I do the app doesn’t start (I suppose Qt can’t find any fonts). How would i do this? I’ve read about Qt resource system, but I’m not sure how to go about doing this.
These are the steps I had to follow in order to resolve this problem:
First, create a
qt_conf.qrcfile that looks like this:QLibraryInfo will load
qt.conffrom:/qt/etc/qt.confusing the resource system. That should explain the aboveqt_conf.qrc.Second, copy the
qt.conffile to the same directory as theqt_conf.qrcfile (this can be changed, of course).And finally, update the
*.profiles, if any, and rebuild. The originalqt.conffile can be removed from the directory that it was in.