[Interest] Modeless dialog issue on Mac

Oliver Knoll till.oliver.knoll at gmail.com
Wed Nov 15 13:25:02 CET 2023



> Am 15.11.2023 um 13:14 schrieb Oliver Knoll <till.oliver.knoll at gmail.com>:
> 
> But I understand your use case better now, and yes, it is different from mine. However I don‘t know any „top of application (only)“ flag myself (not saying that Qt doesn’t provide such a flag - I just don’t know).

And what do we do if we developers are too lazy to read the fine manual? Exactly! We have someone else read it for us - like your favourite LLM! ;)

Here is what ChatGPT has to say about it:

https://zzzcode.ai/answer-question?id=d21e6762-84c8-406c-823c-f379471ce766

Quote: „ Yes, in Qt, there is a flag that can be used to make a modeless dialog stay on top of the application. This flag is called Qt::WindowStaysOnTopHint. By setting this flag on a modeless dialog, you can ensure that the dialog remains on top of all other windows in the application.“

And even better: a quick research reveals that this flag („hint“) actually seems to exist ;)

In fact, you can try it out right away and tell us how it went:

https://doc.qt.io/qt-6/qtwidgets-widgets-windowflags-example.html

;)

Hope that helps!
  Oliver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20231115/5662ce7e/attachment.htm>


More information about the Interest mailing list