There is no accurate way to detect the state of printer as some printers don't have the capability of reporting their state to the operating system.
But you can get the current state of the printer by:
PrinterState QPrinter::printerState() const
Which returns Idle, Active, Aborted and Error. I think if the printer state goes from Active to Idle then the job is finished. So you can periodically check the state of printer in a timer event and if the state goes from Active to Idle then you can emit a signal which shows that the printing is done: