5 /*! \defgroup GrpWindowQT OpenSG QT Window System Library
6 \ingroup GrpWindowSystems
8 \brief The library for QT windows.
10 See \ref PageWindowQT for details.
13 /*! \defgroup GrpWindowQTField Fields
16 See \ref PageBaseField for details.
19 #if (OSG_DOC_LEVEL >= 3)
20 /*! \defgroup GrpWindowQTFieldTraits Field Data Traits
21 \ingroup GrpWindowQTField
27 /*! \defgroup GrpWindowQTFieldSingle Single-Element Fields
28 \ingroup GrpWindowQTField
33 /*! \defgroup GrpWindowQTFieldMulti Multi-Element Fields
34 \ingroup GrpWindowQTField
39 /*! \page PageWindowQT QT Window System Library
41 QT is a portable GUI toolkit written by Trolltech (www.trolltech.com), which is
42 used for a large number of Linux applications, especially the KDE project.
43 Current versions do much more than windowing, but OpenSG is only concerned about
46 The osg::QTWindow itself is only the OpenSG half of using OpenSG in QT, it has
47 to be accompanied by an OSGQGLWidget, which is the QT half. Usually, in
48 standard QT style, an application would derive its own widget from the
49 OSGQGLWidget and add its data to the widget. The QTWindow needs to know which
50 OSGQGLWidget it is associated with.
52 The main purpose of the special QGLWidget
53 is to prevent QT from taking over the OpenGL context and let the osg::QTWindow
54 handle that. The standard QT methods for OpenGL handling (makeCurrent,
55 swapBuffers, initializeGL, paintGL, resizeGL) need to be redirected to the
56 QTWindow, see testWindowQT_qt.cpp for an example.
58 \anchor PageOSGQGLManagedWidget As a convenience class there is a
59 osg::OSGQGLManagedWidget, which is derived from osg::QGLWidget and implements
60 all the necessary functions. Furthermore it has an osg::SimpleSceneManager
61 built in to provide some basic interaction features.
64 <h3>Using the QT Window System Library as a QT Designer plugin</h3>
65 The WindowQT library can also be used as a plugin for the QT Designer. The
66 plugin offers a widget usable in QT Designer or any other application
67 utilizing the QT plugin interface. The widget coming with the plugin is named:
68 - OSGQGLManagedDesignerWidget
70 This class is a wrapper for the osg::OSGQGLManagedWidget widget.
71 Wrapping is necessary since QT doesn't fully
72 support namespaces when the QT Designer is used and thus the wrapper class
73 is \b not within the osg namespace.
75 <h4>Installing the QT Designer plugin</h4>
76 In order to use the plugin within QT Designer copy the library to
77 $QTDIR/plugins/designer or symlink it. When starting QT Designer the next time,
78 the plugin widget is filed under the OpenSG tab. You can now use it like any
79 other widget offered by QT Designer.
81 There are other ways to integrate a QT plugin into designer (and some pitfalls,
82 too). For a full documentation on QT plugins and how to use them in your own
83 application (non Designer usage) refer to QTs plugin documentation at
84 <a target="_blank" href="http://doc.trolltech.com/3.1/plugins-howto.html">Qt plugins-howto</a>