Results 1 to 2 of 2

Thread: QDialog as Qt::Tool on Mac

  1. #1
    Join Date
    Feb 2009
    Posts
    79
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QDialog as Qt::Tool on Mac

    Hi!
    At some point, my app opens a Dialog which contains controls to configure a tool. Ok. On wiondws this works just fine:
    Qt Code:
    1. class MyToolDialog : public QDialog
    2. {
    3. //...
    4. }
    5.  
    6. // in the main app:
    7.  
    8. MyToolDialog * d = new MyToolDialog(this, Qt::Tool);
    9. d->setAttribute(Qt::WA_DeleteOnClose)
    10. d->show();
    11. d->raise();
    12. d->activateWindow();
    To copy to clipboard, switch view to plain text mode 
    Now this makes the dialog stay on top, and the main widget is still accessible. As it should.


    BUT
    On my Mac, 10.5.something with Qt 4.5.3, the dialog does not stay on top.

    Same code, same everything.

    I also used this Qt::WA_MacAlwaysShowToolWindow, and I also tried to set Qt::WindowStaysOnTopHint explicitly, but still the dialog goes behind the main app as soon as I use the tool.

    Thanks for yourhelp in advance
    Olli

  2. #2
    Join Date
    Feb 2009
    Posts
    79
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDialog as Qt::Tool on Mac

    Hi, its me again.

    I altered the MyToolDialog class to be a subclass of QWidget instead of QDialog now, but it does not change anything.

    On Windows everything works fine, on Mac not.

    Maybe this is a bug?

    Thanks in advance,
    Olli

Similar Threads

  1. Replies: 5
    Last Post: 1st March 2010, 15:55
  2. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02
  3. adding QAction to QDialog is not working
    By sanjayshelke in forum Qt Programming
    Replies: 3
    Last Post: 13th August 2008, 09:39
  4. Resizing a QDialog to the content size
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 15th March 2007, 08:16
  5. Qdialog as a child widget
    By dave in forum Newbie
    Replies: 12
    Last Post: 14th November 2006, 09:43

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
  •  
Qt is a trademark of The Qt Company.