On Thursday, 11 April 2019 06:44:40 PDT Jason H wrote:
> Thanks! If it's that easy, and more reliable, why doesn't qApp->quit() do it
> that way?
Because it is not "quitLater", it's "quitNow". The difference between those
two things is the sequencing of the event loop interruption compared to
gunov"
To: "Jason H"
Cc: "Konstantin Shegunov" , "Interests Qt"
Subject: Re: [Interest] Signals, slots before the event loop starts?
On Thu, Apr 11, 2019 at 4:57 PM Jason H <jh...@gmx.com> wrote:
Update on this:
It didn't work. I called i
s, slots before the event loop starts?
Thanks! If it's that easy, and more reliable, why doesn't qApp->quit() do it that way?
Sent: Thursday, April 11, 2019 at 8:54 AM
From: "Konstantin Shegunov"
To: "Jason H"
Cc: "Giuseppe D'Angelo" , "Interes
Thanks! If it's that easy, and more reliable, why doesn't qApp->quit() do it that way?
Sent: Thursday, April 11, 2019 at 8:54 AM
From: "Konstantin Shegunov"
To: "Jason H"
Cc: "Giuseppe D'Angelo" , "Interests Qt"
Subject: Re: [Interest]
On Thu, Apr 11, 2019 at 3:48 PM Jason H wrote:
> What is the best way to do that? I think in the past, I used a 0ms timer,
> but that always feels janky.
>
QMetaObject::invokeMethod(qApp, ::quit,
Qt::QueuedConnection);
is my preference.
___
Interest
> Sent: Thursday, April 11, 2019 at 7:35 AM
> From: "Giuseppe D'Angelo via Interest"
> To: interest@qt-project.org
> Subject: Re: [Interest] Signals, slots before the event loop starts?
>
> Il 11/04/19 00:18, Jason H ha scritto:
> > In a QObject who is exporte
Il 11/04/19 00:18, Jason H ha scritto:
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.
"Tony Rietwyk"
> To: interest@qt-project.org
> Subject: Re: [Interest] Signals, slots before the event loop starts?
>
> Hi Jason,
>
> Why can't your initialisation pass back a status to the main routine?
>
> Otherwise I suggest to use a short timer, so it gets picked up
Hi Jason,
Why can't your initialisation pass back a status to the main routine?
Otherwise I suggest to use a short timer, so it gets picked up early
when the main event loop starts.
Hope that helps, Tony
On 11/04/2019 8:18 am, Jason H wrote:
I've now come across two places in my code
I've now come across two places in my code where this is an issue (at various
states of initializing)
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();
10 matches
Mail list logo