Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Change font in Qt application
S60 5th Edition
This code snippets shows how to change font of application in Qt. API QApplication::setFont() will set the font of application, and it take QFont as parameter. so normally we need to specify font using QFont API.
This snippet can be self-signed. As it does not use any API which require developer/certified signing.
- Download the latest Qt for S60 distribution from Qt.
- Install Qt for S60:Installing Qt on S60
- Check this link for installation guide: How to install the package.
- Go through this article: Getting started with Qt for S60
//specify a new font.
QFont newFont("Courier", 8, QFont::Bold, true);
//set font of application
- QFont: QFont reference
- The Code Example will show font Courier and you can change it to Times from menu. The example is tested on Nokia 5800 XpressMusic.