Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-25 Thread Tor Arne Vestbø via Interest
Hi, Can you elaborate on why you need to distinguish a quit from the Dock vs one initiated by qApp->quit()? See https://bugreports.qt.io/browse/QTBUG-118533 Cheers, Tor Arne On 23 Oct 2023, at 21:05, Alexander Dyagilev wrote: Hello, In Qt 5.x we had QEvent::Close when the user was using

Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-25 Thread Volker Hilsheimer via Interest
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

Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-24 Thread Alexander Dyagilev
Then, it means it's a bug, because it's set always. At least in Qt 6.4.2. On 10/24/2023 12:15 AM, Volker Hilsheimer via Interest wrote: They should; the window system event is handled as a spontaneous event and should reach Q(Gui)Application::event with the spontaneous flag set; a call to

Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-24 Thread Alexander Dyagilev
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

Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-23 Thread Volker Hilsheimer via Interest
> On 23 Oct 2023, at 22:30, 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

Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-23 Thread Hamish Moffatt via Interest
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

Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-23 Thread Alexander Dyagilev
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