What do I do when I run QT with a small text OK6410?

Source: Internet
Author: User

QT program runs on the PC, the font size is no problem, but down to the development Board, it becomes very small, almost invisible,

Board folinx6410 qt4.7.1 4.3 inch LCD screen

Try to add-font Unifont in the back, the word is bigger, but the size is the same.

After the online find a method: Set environment variables on the board

Export qws_display=linuxfb:mmwidth:240:0

240 This value can be modified by itself, the smaller the value, the word on the board will be displayed larger. And the size of the word is controlled by the program.

If this changes, there is no change (sometimes ineffective, do not know why), then try

Export qws_display= "linuxfb:mmheight=125:mmwidth=39"

This seven-inch screen for 800x480, I think almost, we can modify their own


QT display in Chinese under ARM board

Copy a SIMSUM.TTC from the Windows system

Put it under the lib/fonts in the QT directory of the board.

When running the program, add-font SimSun in fact with Unifont can also display Chinese (but it will make the text size is the same, cannot be controlled by the program size).

This can only solve the TR ("English") This qtransltor translated Chinese, if you want to display TR ("Chinese") This is the Chinese language itself is garbled, you can add the following lines of code

Qtextcodec::setcodecforlocale (Qtextcodec::codecforname ("UTF-8"));
QTEXTCODEC::SETCODECFORTR (Qtextcodec::codecforname ("UTF-8"));
Qtextcodec::setcodecforcstrings (Qtextcodec::codecforname ("UTF-8"));


When running, use./1-qws-display "linuxfb:mmwidth200:mmheight80:0"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.