[Qt-interest] custom widgets and OpenGL
Tyler Daniel
tyler at rosette-research.com
Fri Nov 12 03:09:46 CET 2010
Hi all, I'm looking for some advice on how best to implement a custom widget for a simple OGL scene.
I have have several ogl windows displaying simple scenes, and need to implement a manipulation widget with a few different active areas ("handles").
There are two decisions to be made:
1) use QGraphicsView/QGraphicsScene or just subclass GLWidget
2) implement the widget by subclassing some Qt class, or grab mouse/keyboard events and do it all manually.
I have a simple test going now using QGraphicsView/Scene, as it seemed to be the recommended setup. OTOH, the simplicity of subclassing QGLWidget is appealing, as I don't need all the "item" functionality.
So my questions are:
1) recommendations for a basic approach? I'm new to Qt and don't have a good mental picture yet of what all is available.
2) anyone know of any reasons to not use a QGLWIdget (subclass) as a window? I've read that there have been problems with full-screen in the past. In a simple test here on Win7 it seems to work ok if I have two monitors attached. With only one monitor I get brief flickering to black when switching windows...
3) if I go the QGLWidget subclass route, would it be easy to add in Qt widgets / text rendering later by creating a QPainter, or something like that?
Any advice greatly appreciated!
Tyler
More information about the Qt-interest-old
mailing list