#include int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel label(QStringLiteral("Hello World!")); label.resize(250, 100); label.show(); QTimer timer; QObject::connect(&timer, &QTimer::timeout, [&]() { label.setWindowTitle(QTime::currentTime().toString()); }); timer.start(100); return app.exec(); }