qtwidgets no big font on beaglebone black

89 views Asked by At

I managed to build and boot the tisdk-default-image-am335x-evm using 07.03.00.005.

I run some of the qt demo apps that are packaged into that image, and it looks good to me.

I created a simple qtwidgets app (cross-compiling on the host with qtcreator).

Just a mainwindow and a button that has a large font. The app runs on the target, except the large font on the button shows up as a very small font.

I checked /usr/share/fonts/ttf on target, the font I used in the gui is there.

1

There are 1 answers

0
jgnoss On

I managed to get font and font size right for the target.

It's not a yocto or install problem, it's how to use qtcreator.

I'm not sure if it is the preferred method but it works for my case.

I include the font as a resource in the qtcreator project and load it at application init, as show in the link below.

https://amin-ahmadi.com/2016/01/07/embedding-fonts-in-your-qt-app/

So, no dealing with installing fonts on target system.