PDA

View Full Version : How to turn off PC?



wydesenej
20th January 2009, 17:28
Hi,
i need to turn off my PC with QT. Its posible or not?

Thanks,
wydesenej

^NyAw^
20th January 2009, 18:56
Hi,

Yes, but it's not really a Qt behavior.

You have to start a Process that calls "shutdown", that is a console app that shutdowns the computer.


QProcess::startDetached("shutdown -s -f -t 00");