Results 1 to 6 of 6

Thread: Semi-transparent widgets on top of QGLWidget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Semi-transparent widgets on top of QGLWidget

    It is impossible to do it with QGLWidget without doing a workaround. (QT says it itself, I read it somewhere when I was looking for a solution myself)
    I wrote a class (attached) for a European research project and so far it worked perfectly for me.

    All you need to do is to subclass it and set the widget that you want to be overlayed as background. (see the main.cpp file I have attached)

    Hope it helps!
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Semi-transparent widgets on top of QGLWidget

    I think it is much more efficient (and easier) to render the scene to an FBO, convert it to a QImage and paint on a regular raster widget.
    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. Replies: 3
    Last Post: 18th July 2019, 10:25
  2. QGLWidget and transparent widgets
    By blizniak83 in forum Qt Programming
    Replies: 0
    Last Post: 10th April 2012, 17:00
  3. Semi-Transparent Widgets over OpenGL rendering
    By ddpro in forum Qt Programming
    Replies: 2
    Last Post: 19th August 2010, 01:56
  4. qt4.3 semi-transparent widgets winxp
    By kernel_panic in forum Qt Programming
    Replies: 2
    Last Post: 19th July 2007, 06:25
  5. Transparent widgets on top of QGLWidget
    By tseval in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2007, 21:03

Tags for this Thread

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.