#includeIn this example, a QWidget window is created with a setFont method which sets the font of any widgets inside of it. A QLabel widget is then created and added to the window with a centered alignment. The result is a window that displays the text "Hello, world!" in Times New Roman font with a bold weight. The package library for this example is the Qt Widgets module, which is included in the Qt framework.int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget window; window.setWindowTitle("Set Font Example"); // set font for widget QFont font("Times New Roman", 16, QFont::Bold); window.setFont(font); QLabel *label = new QLabel("Hello, world!", &window); label->setAlignment(Qt::AlignCenter); window.show(); return app.exec(); }