Results 1 to 7 of 7

Thread: WindowStaysOnTopHint

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    Massachusetts, USA
    Posts
    19
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: WindowStaysOnTopHint

    The documentation for setWindowFlags() states that it calls setParent(), which in turn documents that it hides the window, necessitating the call to show(). But it appears you discovered that.

    I have another question related to WindowStaysOnTopHint. I notice that when I toggle the option on my top level widget (by means of a checkbox in the window itself), the widget is automatically repositioned on the screen. It's harmless but annoying. Is there a simple way to suppress that repositioning action?

  2. #2
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: WindowStaysOnTopHint

    Quote Originally Posted by McKee View Post
    The documentation for setWindowFlags() states that it calls setParent(), which in turn documents that it hides the window, necessitating the call to show(). But it appears you discovered that.

    I have another question related to WindowStaysOnTopHint. I notice that when I toggle the option on my top level widget (by means of a checkbox in the window itself), the widget is automatically repositioned on the screen. It's harmless but annoying. Is there a simple way to suppress that repositioning action?
    I don't know, but my guess is maybe by reimplementing the paint function (paintEvent()?) and set a position you want it to be drawn an then call its parents paint function

  3. #3
    Join Date
    Jun 2008
    Posts
    89
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: WindowStaysOnTopHint

    But using
    Qt Code:
    1. Qt::WindowFlags flags = windowFlags();
    2. flags ^= Qt::WindowStaysOnTopHint;
    3. setWindowFlags( flags );
    4. show();
    5. activateWindow();
    To copy to clipboard, switch view to plain text mode 

    the window remains on the top of all running applications. what if we just want it to be bound with my application and not other applications running.

    When i press ALT + Tab the window whose flag was set remains on top of new application..this is not what is expected..

    What can be done to avoid this behavior and retaining WindowStaysOnTopHint?

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.