Results 1 to 8 of 8

Thread: Getting rid of a "stay on top" window behaviour

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2014
    Posts
    81
    Thanks
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt5
    Platforms
    Windows
    Wiki edits
    7

    Default Re: Getting rid of a "stay on top" window behaviour

    Can't you parent these widgets to some other QObject like the application instance? You can still close them with the main window by connecting their close() slot to a signal that you emit yourself from inside the main window closeEvent() handler. The behaviour is the same.

    As for the on-top behaviour, when the widgets are not parented to the main window anymore, I think setting WA_ShowWithoutActivating on the new widget 'before' showing it, then showing it and then using activateWindow() on the main window (or whatever widget was at the top before the creation of this new widget) to ensure it continues as the top window, is worth a try.

    http://stackoverflow.com/a/1022121/4206247
    Last edited by Kryzon; 14th August 2015 at 19:58.

Similar Threads

  1. Replies: 3
    Last Post: 16th March 2015, 07:31
  2. "Render" Qt dialog window from ".ui" file
    By BitEater in forum Qt Programming
    Replies: 1
    Last Post: 8th July 2011, 14:40
  3. Replies: 3
    Last Post: 17th March 2010, 16:47
  4. Replies: 3
    Last Post: 8th July 2008, 19:37
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Tags for this Thread

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.