Results 1 to 5 of 5

Thread: How to keep specific window always above other specifi window?

  1. #1
    Join Date
    Dec 2010
    Posts
    5
    Thanks
    1

    Default How to keep specific window always above other specifi window?

    How to keep specific window always above other specific window? I have the following situation:
    I have one window with embedded video stream and then I have a transparent window of the same size as OSD. (I'm doing this because I need real transparency, not some double-buffered semi-thing.)
    Keeping their positions synchronized is easy task. But I don't know how to make the the OSD 'always on top of the video stream'. I can only make it 'always on top of everything'.

  2. #2
    Join Date
    Aug 2011
    Location
    Seoul, Korea
    Posts
    46
    Thanks
    9
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to keep specific window always above other specifi window?

    Quote Originally Posted by grawp View Post
    How to keep specific window always above other specific window? I have the following situation:
    I have one window with embedded video stream and then I have a transparent window of the same size as OSD. (I'm doing this because I need real transparency, not some double-buffered semi-thing.)
    Keeping their positions synchronized is easy task. But I don't know how to make the the OSD 'always on top of the video stream'. I can only make it 'always on top of everything'.
    I guess you can achieve this by handling focus and mouse events. For example, if one of the "sub window", which should be always under the top window, is clicked or focus so it will attempt to be the top of all windows, then catch that event and make sure the top window is raised above the clicked one...

    However, it seems your are doing some sort of overpainting... wouldn't it be easier make the two drawing into one widget?

    Regards,
    Dong Back Kim

  3. #3
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: How to keep specific window always above other specifi window?

    Make the child window as model window, and set it's parent as the specific window.

  4. The following user says thank you to Santosh Reddy for this useful post:

    grawp (7th August 2011)

  5. #4
    Join Date
    Dec 2010
    Posts
    5
    Thanks
    1

    Default Re: How to keep specific window always above other specifi window?

    Quote Originally Posted by Dong Back Kim View Post
    However, it seems your are doing some sort of overpainting... wouldn't it be easier make the two drawing into one widget?
    I've already tried. The problem is that the subwindow contains QX11EmbedContainer with embedded video window from Linphone (VOIP sw.) and I can't draw on a window from external application.
    Last edited by grawp; 7th August 2011 at 10:48.

  6. #5
    Join Date
    Dec 2010
    Posts
    5
    Thanks
    1

    Default Re: How to keep specific window always above other specifi window?

    I've solved this issue by setting modality to Qt::WindowModal and window flags to Qt::Window to have true separate X11 window.

Similar Threads

  1. Replies: 2
    Last Post: 17th February 2011, 12:30
  2. Replies: 9
    Last Post: 16th May 2010, 16:21
  3. Replies: 2
    Last Post: 10th December 2009, 07:01
  4. Replies: 11
    Last Post: 4th June 2008, 07:22
  5. positioning a window at a specific screen position
    By nupul in forum Qt Programming
    Replies: 3
    Last Post: 29th March 2006, 20:21

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.