PDA

View Full Version : unclosable program



TonyInSoMD
7th February 2018, 12:11
I want to write a program that starts at start up, and then can't be closed. It's a user log program that tracks when the user is at the keyboard and if they close the program, it won't be able to track whether they are on or not. It's a shared computer so it can have multiple users logged into a single windows user session. Is there a way to make a program persistent with the only way to close it is to go into Task Manager? I realize that with Task Manager you can close anything, there's no way around that. I customized the flags so that the CloseButtonHint is not enabled, but the user can still right click the icon on the task-bar and close it that way.

TonyInSoMD
7th February 2018, 15:21
Found a solution. re-implement closeEvent(QCloseEvent *event) and have it run event->ignore() every time closeEvent is called.