You can use signals and slots in a console application. You can subclass QCoreApplicationor just use it as an event loop. In, main()create an object QCoreApplicationalong with any of your own objects using signals and slots, connect the signals, and then call .exec()onto the object QCoreApplication. Make sure you have a way to signal QCoreApplicationto exit.
source
share