#include#include QLabel* label = new QLabel("Hello World!"); QFont font("Arial", 12, QFont::Bold); label->setFont(font);
#includeIn this example, the QFontDatabase class is used to get a list of all available font families installed in the system. The list is returned as a vector of QString objects. Package library: Qt#include std::vector fontFamilies = QFontDatabase::families();