Font rendering on background threads can be a little flaky in Qt, depending on how it was compiled. Check the value of QFontDatabase::supportsThreadedFontRendering on your system.
Note the documentation: Returns true if font rendering is supported outside the GUI thread, false otherwise. In other words, a return value of false means that all QPainter::drawText() calls outside the GUI thread will not produce readable output.
然后我分别在Windows和Linux下调试了下返回值。一个返回true一个返回false,感觉麻烦大了。