47
47
<p>Assuming that the requirements mentioned above are met, a <a href="qglwidget.html">QGLWidget</a> will default to using the main plane visual, while all other widgets will use the overlay visual. Thus, we can place a normal widget on top of the <a href="qglwidget.html">QGLWidget</a>, and do drawing on it, without affecting the image in the OpenGL window. In other words, we can use all the drawing capabilities of <a href="qpainter.html">QPainter</a> to draw annotations, rubberbands, etc. For the typical use of overlays, this is much easier than using OpenGL for rendering annotations.</p>
48
48
<p>An overlay plane has a specific color called the transparent color. Pixels drawn in this color will not be visible; instead the underlying OpenGL image will show through.</p>
49
49
<p>To use this technique, you must not use the <a href="qapplication.html#ColorSpec-enum">QApplication.ManyColor</a> or QApplication.TrueColor color specification for <a href="qapplication.html">QApplication</a>, because this will force the normal Qt widgets to use a <tt>TrueColor</tt> visual, which will typically be in the main plane, not in the overlay plane as desired.</p>
50
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.7 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.3</td></tr></table></div></address></body></html>
50
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.8.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.7.0</td></tr></table></div></address></body></html>