Here "this" is a pointer to the parent dialog. I've tried with QMainWindow too as a parent, but unfortunately the problem is still there, not sure if that's another bug. The only way I found for having the modeless dialog on top of its parent is to create it with Qt::Tool flag. That problem is only happening on Mac, it is properly working both on Windows and Linux.
On Tue, Nov 14, 2023 at 4:22 PM Frank Osterfeld <frank.osterf...@kdab.com> wrote: > > > > On 14. Nov 2023, at 11:49, Calogero Mauceri <mauc...@actgate.com> wrote: > > > > Hi all, > > > > I have the following problem with dialogs on the Mac. > > > > I have a main window/dialog and I am opening a modeless dialog, I need > to have both the main window/dialog and the modeless dialog visible at the > same time. > > I create the modeless dialog as simple as this > > > > QDialog* myDialog = new QDialog(this); > > What is “this” here? The main window? I’ve seen these problems (unexpected > window stacking) on Mac more than elsewhere when no parent/the wrong parent > was passed, but can’t remember seeing it when passing the main window. > (Haven’t done much macOS/Widget development recently though) > > — > Frank Gonçalves Osterfeld | frank.osterf...@kdab.com | Senior Software > Engineer & Teamlead > KDAB (Deutschland) GmbH, a KDAB Group Company > Tel: +49-30-521325470 > KDAB - The Qt, C++ and OpenGL Experts > -- Calogero Mauceri Software Engineer Applied Coherent Technology Corporation (ACT) www.actgate.com
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest