Results 1 to 3 of 3

Thread: Transparent QWidget on QGLWidget

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

    Question Transparent QWidget on QGLWidget

    Hi, all

    Is there any way to put a transparent QWidget (QPixmap, QGLWidget etc.) on a QGLWidget?

    I have tried that transparent QWidget can be put on another QWidget except QGLWidget. Does Qt not surpported?
    There is no secret in the face of the code.

  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 QWidget on QGLWidget

    Quote Originally Posted by showhand View Post
    Is there any way to put a transparent QWidget (QPixmap, QGLWidget etc.) on a QGLWidget?
    Yes, there is (note that QPixmap is not a widget). But what for? If you want a pixmap on your glwidget, then just use overlays, just like one of Qt demo applications does.

    I have tried that transparent QWidget can be put on another QWidget except QGLWidget. Does Qt not surpported?
    In what way was it put "on" another widget? Could you show a code sample?

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

    Default Re: Transparent QWidget on QGLWidget

    The demo is about QPainter in a QGLWidget. I need an another(forground) QGLWidget or QGLContext which the background is transparent. Thus, one glwidget is used to draw some background graphics and the other one draw forground graphics, although they do not impact each other. The forground QGLWidget or QGLContext's graphics look like on the background widget.

    Can you give me some good advice? Thanks for any replay!!
    There is no secret in the face of the code.

Similar Threads

  1. Replies: 3
    Last Post: 8th December 2006, 18:51
  2. QGLWidget on another QGLWiget
    By showhand in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2006, 09:59
  3. Using QGLWidget paint engine to draw regular widgtes?
    By high_flyer in forum Qt Programming
    Replies: 11
    Last Post: 9th October 2006, 12:06
  4. Replies: 1
    Last Post: 2nd May 2006, 21:11
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 22:59

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.