C++ (Qt)QMessageBox m;QTimer timer;connect(&timer, &QTimer::timeout, &m, &QMessageBox::close);timer.start(3);m.exec();