[Interest] Signals, slots before the event loop starts?

Thiago Macieira thiago.macieira at intel.com
Fri Apr 12 04:05:39 CEST 2019

On Wednesday, 10 April 2019 15:18:55 PDT Jason H wrote:
> In a QObject who is exported to QML, and is instantiated just below the
> top-level Window: //  in the object's open() method:
> if (!_serialPort.open(QIODevice::ReadWrite))
>         qApp->quit(); // won't actually quit - no use if I can't use the
> serial port. (because another instance is using it)

It did quit 100% of the event loops that were running at the time.

All zero of them.

[Yeah, I know I am performing division by zero]

You can't quit an event loop that isn't running. What you need to do is not 
start it at all if you don't want it to.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products

More information about the Interest mailing list