PDA

View Full Version : QFontDatabase:Cannot find font directory



soumya
28th August 2009, 07:31
Hi All,

I am trying to run a Qt application on Arm board

./dro -qws

I get the following error:
QFontDatabase: Cannot find font directory /usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib/fonts - is Qt installed correctly?
Aborted.

Any help or suggestions asap.:)

sxchen
28th August 2009, 08:33
Missing font file!
eg.
cp fontdir /usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib/fonts
cp msyh.ttf /usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib/fonts

More details:
You can be found in the QtAssistant Or Google “Fonts in Qt/Embedded” 。

soumya
28th August 2009, 08:46
Hi,

Thanks for the reply i have copied the fonts file after that also i am getting the same error..

when i copy that font directory all the file names get changed in the target
so renamed it as it is in the host, but still the same error.


Thanks & Regards,
Soumya

r0bertu
7th May 2010, 18:47
Hello,


Soumya I'm having the same problem!
you can solve it?
how?

thanks!!
Roberto Filho

soumya
17th May 2010, 11:30
Hi Roberto,

copy the fonts from /usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib/fonts to your target
say /opt/qt/lib/fonts/
then set the environment variable like
export LD_LIBRARY_PATH=/opt/qt/lib/

It worked for me hope for you too

Regards,
Soumya

suma
24th February 2011, 05:26
hai soumya...
i saw ur post in the mail... actually iam building QT-4.7 for MIPS...
when i run my application...even iam getting the same error as" unable to find the font directory"..
i tried even to set the QT_QWS_FONTDIR=/path/to/font/dir/ on target also.. but still dint work..
so wanted to know..any idea for u about this... that might help me...


Hello,


Soumya I'm having the same problem!
you can solve it?
how?

thanks!!
Roberto Filho

savaliya_ambani
2nd May 2011, 07:51
Did you get your problem solved,soumya & roberto, then please help me?

edhana
17th July 2013, 17:28
Someone actually solved this problem? I configured the font to the right directory in my device but it still complain's about not finding the font directory.

fgonzalez
4th August 2014, 09:27
Hi

For me the solution was as described above:

1.- copy a valid fonts directory (in this case a Qt compiled for x86, or the host machine) into the target rootfs system. i.e.
cp -r /home/Documents/qt-x86/lib/fonts /external_sdcard_mounted_point/home/user/lib/fonts-qt
2.- set the variable QT_QWS_FONTDIR to the new created directory. i.e.
export QT_QWS_FONTDIR=/home/user/lib/fonts-qt/

Then I run in the target machine the example for analogclock and it worked perfectly

skumararaja@gmail.com
10th November 2014, 06:08
Hey!

Did you guys find the solution?

--Kumar