Application is not running after computers reboot
I have such code:
class Application : public QApplication;
void Application::PreShutdown(QSessionManager& sm)
Application::Application(int argc, char** argv)
: QApplication(argc, argv),
I tried QSessionManager::RestartIfRunning, QSessionManager::RestartAnyway, QSessionManager::RestartImmediately, but after reboot my application is not running.
What's wrong? OS: Windows 7 Qt: 5.3.1
Hi, if you want an application to start when you turn on the power or reboot your computer, easiest I think is to place a shortcut to the application in the Autostart folder in your Start menu.
QSessionManager doesn't seem to do that for you, perhaps you need to do it manually.
@hskoglund Thanks for reply.
In fact, I want to run my application after reboot only if it was running where computer was rebooted.