Results 1 to 5 of 5

Thread: Transparent window with QGLWidget

  1. #1
    Join Date
    Nov 2006
    Location
    Poland
    Posts
    35
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Question Transparent window with QGLWidget

    Hello,

    I need to create a window in Qt which will be transparent
    (like in xeyes command) and will contain QGLWidget in it, also
    transparent. So that the result of rendering i.e. a cube in the
    QGLWidget will just draw the cube on the desktop.

    Is it possible? Or does it require extensions to X or Xgl server to
    allow this?

    I have been looking for the solution quite much, but cannot find
    anything interesting.

    Thanks for your answers,
    ultr

  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: Transparent window with QGLWidget


  3. The following 2 users say thank you to wysota for this useful post:

    rbp (27th November 2008), ultr (24th November 2006)

  4. #3
    Join Date
    Jan 2006
    Posts
    26
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Transparent window with QGLWidget

    I met the same problem with you. How do you set the transparent window and draw graphics with opengl commands in QGLWidget. As I know, QWidget::setMask() does not take effective on QGLWidget. Would you please give some example code to me or picture of your program?

    Thanks for any replay!
    Last edited by showhand; 25th November 2006 at 04:13.
    There is no secret in the face of the code.

  5. #4
    Join Date
    Apr 2008
    Posts
    2

    Default Re: Transparent window with QGLWidget

    does the problem still remain unsolved?

  6. #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: Transparent window with QGLWidget

    I can think of using a regular widget instead of QGLWidget and rendering the GL data to a buffer instead of the screen, so that then you'll be able to apply a mask on the resulting image (at least in Qt4). Unfortunately it's not easy to have the mask itself... I can think of using the bluebox approach for it, if you don't use multisampling, it might just work.

Similar Threads

  1. Transparent QWidget on QGLWidget
    By showhand in forum Qt Programming
    Replies: 2
    Last Post: 27th November 2006, 02:00
  2. QGLWidget and multiple windows
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st November 2006, 14:38
  3. QGLWidget on another QGLWiget
    By showhand in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2006, 10:59
  4. Making some part of window transparent
    By yogeshm02 in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2006, 21:36
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 11: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.