Results 1 to 2 of 2

Thread: How to have a MainWindow always on top of another MainWindow on Mac

  1. #1
    Join Date
    Mar 2006
    Posts
    56
    Thanks
    7
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How to have a MainWindow always on top of another MainWindow on Mac

    Hi,

    I'm getting crazy with a simple problem and would be really grateful if someone could help me solving it.

    I have a MainWindow say W1 which is the main application. When the user clicks a button, I open a new MainWindow, say W2, having W1 as parent. The new MainWindow W2 is shown on top of its parent Window W1, which is fair.

    On Windows if I click on W1, W2 loses focus but it KEEPS staying on top of W1.
    On Mac there is a different behavior, if I click on W1, then W2 goes behind W1, while I would like to have W2 always on top of W1.

    I tried to use the Qt::WindowStaysOnTopHint flag when creating W2 window. It works, but it is "too much", because if a modal dialog is opened from W1 when W2 is shown (say an error message from W1) then it appears behind W2 and I can not click on it.

    I'm using the latest version of Qt 4.6.3.

    Thanks in advance for your help

  2. #2
    Join Date
    Mar 2006
    Posts
    56
    Thanks
    7
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to have a MainWindow always on top of another MainWindow on Mac

    I just solved the problem creating the MainWindow with the Qt:ialog flag.

Similar Threads

  1. MainWindow
    By amagdy.ibrahim in forum Newbie
    Replies: 6
    Last Post: 14th June 2008, 15:12
  2. Floating MainWindow on OS X
    By dvmorris in forum Qt Programming
    Replies: 7
    Last Post: 14th May 2007, 10:11
  3. MainWindow Menu bug in Qt 4.2.3?
    By No-Nonsense in forum Qt Programming
    Replies: 4
    Last Post: 11th March 2007, 12:47
  4. What's the best way to implement a MainWindow
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 5th February 2007, 18:46
  5. mainwindow does not refresh
    By edb in forum Qt Programming
    Replies: 22
    Last Post: 25th January 2006, 17:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.