-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Qt 重启
Qt 实现电脑重启(需要管理员)
inline void reboot()
{
QString program = QApplication::applicationFilePath();
QStringList arguments = QApplication::arguments();
QString workingDirectory = QDir::currentPath();
QProcess::startDetached(program, arguments, workingDirectory);
QApplication::exit();
}blog link Qt 重启