Indeed, you are right. I missed that QCoreApplicationPrivate::quit is virtual 
and overridden in QGuiApplicationPrivate to go through the QPA layer, which 
then looks for Qt like any other spontanous event. Created 
https://bugreports.qt.io/browse/QTBUG-118533

Not a high priority, as you can know when you call QApplication::quit() 
yourself, I suppose.

Volker


> On 24 Oct 2023, at 20:30, Alexander Dyagilev <alervd...@gmail.com> wrote:
> 
> Hello,
> 
> No, it returns true always.
> 
> On 10/23/2023 11:30 PM, Hamish Moffatt via Interest wrote:
>> On 24/10/23 06:10, Alexander Dyagilev wrote:
>>> I would prefer for an additional event to be used when the user triggers 
>>> Quit. E.g. something like QEvent::QuitByUser.
>>> 
>>> For now, it seems I will have to involve some additional ugly logics 
>>> (something like setting a global variable).... More code more complexity 
>>> for such a simple situation. Not good, IMO. 
>> 
>> 
>> Does QEvent::spontaneous() tell you anything about the two different quit 
>> events?
>> 
>> Hamish
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

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

Reply via email to