| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 3 | |
There is a way to make the background of a QGLWidget transparent? I want to draw a 3D scene having the content of the screen (e.g. other windows) as background... It's possible? Thanks! ------------------------------------------------------ Leggi GRATIS le tue mail con il telefonino i-mode? di Wind http://i-mode.wind.it/ -- [ signature omitted ]
I think it's not possible to set the background transparent (becase on every repaint of an opengl scene (the whole widget) you have to clear the whole color buffer). But you can try one of those: - grabbing the widgets behind the QGLWidget and use that pixmap as a background texture for the QGLWidget - render the QGLWidget on a pbuffer (see the related qt class), then take the resulting pixmap and paint it on the top of your window - use the QGraphicsView framework over a QGLWidget. This way you can mix QGraphicsItems (drawn by QPainter) and native OpenGL calls [* best results] Of course other ways to do that may exist, but that's what I can think about right now. If you can provide more details on your application we can try to give you better hints! Ciao, Enrico On Sunday 15 July 2007 08:46:14 fabiodago@xxxxxxxxx wrote: > There is a way to make the background of a QGLWidget transparent? > > I want to draw a 3D scene having the content of the screen (e.g. other > windows) as background... It's possible? > > Thanks! -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: 250 biglietti da visita Gratis + 42 modelli e Etichette per Indirizzo Gratis + Porta biglietti Gratis -Offerta limitata! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6785&d=15-7 -- [ signature omitted ]