字体库:
https://www.fonts.net.cn/fonts-zh/tag-wenquanyi-1.html
参考链接:
https://blog.csdn.net/kozazyh/article/details/79365706
字体库的路径及配置文件
/usr/share/fonts
/usr/local/share/fonts
/etc/fonts/fonts.conf
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
qt5.6显示汉字
http://bbs.witech.com.cn/article-253-1.html
ui->textEdit->setText(tr("中文"));
qt4.8显示汉字
tItem = new QTableWidgetItem(QString::fromLocal8Bit("中文"));
Qt工程文件时间戳问题
问题现象:
forlinx@forlinx:~/test$ make clean
make: Warning: File '/usr/lib/aarch64-linux-gnu/qt5/mkspecs/qconfig.pri' has modification time 34787072 s in the future
/usr/lib/qt5/bin/qmake -o Makefile fonts.pro
make: Warning: File '/usr/lib/aarch64-linux-gnu/qt5/mkspecs/qconfig.pri' has modification time 34787072 s in the future
/usr/lib/qt5/bin/qmake -o Makefile fonts.pro
make: Warning: File '/usr/lib/aarch64-linux-gnu/qt5/mkspecs/qconfig.pri' has modification time 34787071 s in the future
/usr/lib/qt5/bin/qmake -o Makefile fonts.pro
make: Warning: File '/usr/lib/aarch64-linux-gnu/qt5/mkspecs/qconfig.pri' has modification time 34787071 s in the future
/usr/lib/qt5/bin/qmake -o Makefile fonts.pro
问题原因:
文件最后修改的时间比当前系统的时间要晚。部分系统启动时没有联网,导致系统时间为设置的默认时间,比如1970.1.1。这样就会导致自己导入的工程文件比当前的系统时间还要晚,编译的时候就会报这个问题。
修复方法:修改当前的系统时间,设置为当前时间即可。