PDA

View Full Version : How to fix Qt 4 fonts on Mac OS X 10.9



AndyBrice
23rd October 2013, 13:44
Mac OS X 10.9 was released yesterday. When I ran my Qt 4 app on 10.9, the text alignment in the controls was broken. Here is the fix:


#ifdef Q_OS_MACX
if ( QSysInfo::MacintoshVersion > QSysInfo::MV_10_8 )
{
// fix Mac OS X 10.9 (mavericks) font issue
// https://bugreports.qt-project.org/browse/QTBUG-32789
QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
}
#endif

QApplication a( argc, argv );

More details at:
http://successfulsoftware.net/2013/10/23/fixing-qt-4-for-mac-os-x-10-9-mavericks/

I hope that helps someone.