[Interest] QProcess overload slot connection

Jérôme Godbout godboutj at amotus.ca
Wed Mar 13 21:47:46 CET 2019


I for one use the following and it work just fine:

connect(ctr_ptr
        , QOverload<QLowEnergyController::Error>::of(&QLowEnergyController::error)  // QOverload to avoid shadowing of ::error() and ::error(e) signal
        , this
        , &BluetoothConnectionHelper::controllerError);

I also had to use this form once:
connect(ctr_ptr
        , static_cast<void (QLowEnergyController::*)(QLowEnergyController::Error)>(&QLowEnergyController::error)
        , this
        , &BluetoothConnectionHelper::controllerError);


-----Original Message-----
From: Interest <interest-bounces at qt-project.org> On Behalf Of Thiago Macieira
Sent: March 13, 2019 4:22 PM
To: interest at qt-project.org
Subject: Re: [Interest] QProcess overload slot connection

On Wednesday, 13 March 2019 12:02:14 PDT Jason H wrote:
> connect(process, QOverload<int>::of(&QProcess::finished), &loop, 
> &QEventLoop::quit);
> 
> 
> QEventLoop::quit slot does not take any parameters
> 
> 
> What's the "right way" to connect QProcess::finished to QEventLoop::quit?

The one you listed above.

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



_______________________________________________
Interest mailing list
Interest at qt-project.org
https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list