Results 1 to 18 of 18

Thread: How to set Qt window transparent?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: How to set Qt window transparent?

    Forget about transculency on embedded linux. Your X server there probably doesn't support compositing anyway. I'm going to repeat myself one more time - implement your application as a plugin to the webbrowser and switch the browser to WebKit or make everything (including the browser itself) a single application.

  2. #2
    Join Date
    Oct 2007
    Location
    India
    Posts
    162
    Thanks
    20
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to set Qt window transparent?

    Quote Originally Posted by wysota View Post
    Forget about transculency on embedded linux. Your X server there probably doesn't support compositing anyway. I'm going to repeat myself one more time - implement your application as a plugin to the webbrowser and switch the browser to WebKit or make everything (including the browser itself) a single application.
    so it is not possible to get translucency on embedded linux anyway? A normal X11R7 server is running on the embedded hardware.

    About the webkit thing, you are correct but i can't force the company to change it. I am temporary guy working for that company and i have been given a module which i am working on, so i really can't force them to do this as the project schedule is tight and they are using the browser for other applications as well.

  3. #3
    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: How to set Qt window transparent?

    Quote Originally Posted by montylee View Post
    so it is not possible to get translucency on embedded linux anyway? A normal X11R7 server is running on the embedded hardware.
    Even if you manage to enable compositions in the server, they will probably be done in software which will be hell slow.

    About the webkit thing, you are correct but i can't force the company to change it. I am temporary guy working for that company and i have been given a module which i am working on, so i really can't force them to do this as the project schedule is tight and they are using the browser for other applications as well.
    If you tell them it is not possible to obtain the effect they want, maybe this will give them something to think about. Currently I suggest you stick with rendering the browser's window to a pixmap and use that as a background of your widget. It is unlikely you are going to get anything better.

  4. #4
    Join Date
    Oct 2007
    Location
    India
    Posts
    162
    Thanks
    20
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to set Qt window transparent?

    Hmmm thanks for the suggestions!
    I'll try to enable transparency today in the embedded hardware and if it doesn't work i'll use pixmap as the widget background.

    But i still don't know which file does compiz modify to enable X11 composite extensions.

  5. #5
    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: How to set Qt window transparent?

    /etc/X11/xorg.conf should contain an entry such as the following:
    txt Code:
    1. Section "Extensions"
    2. Option "Composite" "Enable"
    3. EndSection
    To copy to clipboard, switch view to plain text mode 

    Also check glxinfo|grep rendering to see if it has direct rendering available.

  6. #6
    Join Date
    Oct 2007
    Location
    India
    Posts
    162
    Thanks
    20
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to set Qt window transparent?

    i tried running the code on the embedded hardware but couldn't see any translucency. I'll see if it has direct rendering.

  7. #7
    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: How to set Qt window transparent?

    It is possible you need to turn on a compositing manager. Check out xcompmgr.

Similar Threads

  1. how QTextEdit transparent to his parent window?
    By wesley in forum Qt Programming
    Replies: 4
    Last Post: 16th September 2009, 07:23
  2. Transparent window with QGLWidget
    By ultr in forum Qt Programming
    Replies: 4
    Last Post: 28th April 2008, 07:01
  3. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 09:30
  4. Regarding drawing on Transparent Window
    By Shalabh in forum Qt Programming
    Replies: 3
    Last Post: 31st May 2007, 10:32
  5. Making some part of window transparent
    By yogeshm02 in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2006, 20:36

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.