Results 1 to 4 of 4

Thread: Painting over QX11EmbedContainer

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

    Default Painting over QX11EmbedContainer

    I have a strange problem. In constructor of my MainWindow (just ordinary QWidget) I create some QWidgets (like button, label...), and add them to a grid layout.
    Then I create "OSD" QWidget subclass.. something like this: http://www.qtcentre.org/wiki/index.p...Widget_Overlay. And at the end of constructor of my MainWindow I do this:
    Qt Code:
    1. osd = new OSD(this);
    To copy to clipboard, switch view to plain text mode 
    It works really nice..

    And I have other QWidget subclass "Video" containing QX11EmbedContainer displaying some X11 window. When I add it to the layout of my MainWindow, the OSD just won't paint over the area where "Video" is.
    What I'm doing wrong? How can I paint over widget containing QX11EmbedContainer? Is there any other way I can embed X11 windows and paint over it?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Painting over QX11EmbedContainer

    I don't think you can paint over an area that is managed by a different application.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Default Re: Painting over QX11EmbedContainer

    Quote Originally Posted by wysota View Post
    I don't think you can paint over an area that is managed by a different application.
    Well, I've never wanted to paint directly over the area owned by other application. I wanted to paint on transparent widget and then lay it over the app. window (whether embedded or not).
    The problem is however that QT transparency is only semi-transparent, double buffered and QT only.

    The solution is to update the background of the transparent overlay in every frame, which is very inefficient. http://forum.videolan.org/viewtopic.php?f=32&t=68816

    Other solution is http://doc.trolltech.com/4.7/widgets-shapedclock.html. I haven't tried it yet, but it looks very promising. Make the overlay as a shaped X11 window (maybe with transparency) and keep it placed over the wanted area..

    Has anybody here ever needed to solve similar problem?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Painting over QX11EmbedContainer

    Quote Originally Posted by grawp View Post
    Well, I've never wanted to paint directly over the area owned by other application. I wanted to paint on transparent widget and then lay it over the app. window (whether embedded or not).
    Since the widget is transparent, you'd need to draw the background first that is residing in the other application. And since you can't do that, you'll get an empty (black) background. That's how the backingstore works.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QX11EmbedContainer problem
    By Martin42 in forum Qt Programming
    Replies: 17
    Last Post: 16th May 2011, 14:25
  2. QX11EmbedContainer's problem, thanks for you help
    By ecbtnrt in forum Qt Programming
    Replies: 0
    Last Post: 2nd November 2010, 10:24
  3. QX11EmbedContainer into a QSplitter (qt 4.4.3)
    By giancarlo in forum Qt Programming
    Replies: 5
    Last Post: 20th December 2008, 22:33
  4. QX11EmbedContainer into QMdiArea
    By peppino in forum Qt Programming
    Replies: 0
    Last Post: 25th September 2008, 17:12
  5. QX11EmbedContainer Problems
    By GuS in forum Qt Programming
    Replies: 2
    Last Post: 24th June 2008, 17:28

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.