Qt 添加启动项
QString application_name = QApplication::applicationName();
QSettings *settings = new QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
if(!settings->allKeys().contains(application_name))
{
QString application_path = QApplication::applicationFilePath();
settings->setValue(application_name, application_path.replace("/", "\\"));
}
delete settings;