Qfontdatabase: cannot find font directory
Http://www.cuteqt.com/blog? P = 86
The error message is similar to the following:
Qfontdatabase: cannot find font directory/usr/local/trolltech/QtEmbedded-4.5.1/lib/fonts-Is QT installed correctly?
The most common cause is that the./configure command is not added during cross-compilation.
-Prefix option, resulting in the default installation path/usr/local/trolltech, even if you use NFS or copy to a path on your embedded device (such
/Foo), the path to be searched is/usr/local/trolltech.
The following is a demonstration. The directory I installed is the/usr/local/trolltech directory. Now I want to move it to the/usr/local/grolltech directory to see what the effect is.
$ MV/usr/local/trolltech/usr/local/grolltech
$ Qvfb &
$./Wiggly-qws
./Wiggly: Symbol lookup error:
./Wiggly: Undefined Symbol: _ zn7qwidget8qwseventep8qwsevent
This error can be avoided by specifying qtdir and LD_LIBRARY_PATH.
$ Export qtdir =/usr/local/grolltech/QtEmbedded-4.5.1
$ Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ qtdir/lib
$./Wiggly-qws
Qfontdatabase: cannot find font directory/usr/local/trolltech/QtEmbedded-4.5.1/lib/fonts-Is QT installed correctly?
Solution: make a soft link to/usr/local/trolltech
$ Ln-S/usr/local/grolltech // usr/local/trolltech/
The same is true for embedding. commands like ln-S/mnt/usr/local/trolltech can be used.
All posts on this site are reserved by this site and the original author. This article can only be reproduced if the copyright information, original article links, and original article authors are retained. Do not delete or modify the original article content for reprinting, it is not intended for commercial purposes. Thank you for your cooperation.
Http://www.cuteqt.com/blog? P = 86