anjinkristou

Add to start up with Qt

Jun 9th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. QString lightscreen = QDir::toNativeSeparators(qApp->applicationFilePath());
  2.  
  3. #ifdef Q_WS_WIN
  4.   // Windows startup settings
  5.   QSettings init("Microsoft", "Windows");
  6.   init.beginGroup("CurrentVersion");
  7.   init.beginGroup("Run");
  8.  
  9.   if (startup)
  10.   {
  11.     init.setValue("Lightscreen", lightscreen);
  12.   }
  13.   else
  14.   {
  15.     init.remove("Lightscreen");
  16.   }
  17.  
  18.   init.endGroup();
  19.   init.endGroup();
  20. #endif
Advertisement
Add Comment
Please, Sign In to add comment