To make your Qt5 or Qt6 software as Windows service or Linux and Mac OSX daemon. It replaces the qtservice package available at https://github.com/qtproject/qt-solutions/tree/master/qtservice
- Cross platform example on how to make a Windows service, Linux and Mac OSX daemon.
- Compatible with Qt5 and Qt6.
- All the required scripts for Windows, Linux and and Mac OSX to create, remove, start and stop the service.
- The example can be run in a Windows, Linux and Mac OSX console to test.
Fill the QCMainClass.cpp and QCMainClass.h with your code, that is all.
The folder contains the following files:
| File | Description |
|---|---|
InstallAsService.sh |
Install the service |
QtServiceTest.service |
The service file |
RemoveAsService.sh |
Remove the service |
ServiceAsConsole.sh |
Start the example in a console with keyboard support. Press 'q' to stop. |
ServiceRestart.sh |
Restart the service |
ServiceStart.sh |
Start the service |
ServiceStop.sh |
Stop the service |
The folder contains the following files:
| File | Description |
|---|---|
InstallAsService.sh |
Install the service |
QtServiceTest.plist |
The service file |
RemoveAsService.sh |
Remove the service |
ServiceAsConsole.sh |
Start the example in a console with keyboard support. Press 'q' to stop. |
ServiceRestart.sh |
Restart the service |
ServiceStart.sh |
Start the service |
ServiceStop.sh |
Stop the service |
The folder contains the following files:
| File | Description |
|---|---|
InstallAsService.bat |
Install the service |
RemoveAsService.bat |
Remove the service |
ServiceAsConsole.bat |
Start the example in a console with keyboard support. Press 'q' to stop. |
ServiceRestart.bat |
Restart the service |
ServiceStart.bat |
Start the service |
ServiceStop.bat |
Stop the service |
LGPL