Quarter  1.2.1
Coin3D GUI binding for Qt
No Matches

Quarter is a light-weight glue library that provides seamless integration between Systems in Motion's Coin high-level 3D visualization library and the Qt 2D user interface library.

Qt and Coin is a perfect match since they are both open source, widely portable and easy to use. Quarter has evolved from Systems in Motion's own experiences using Coin and Qt together in our applications.

The functionality in Quarter revolves around QuarterWidget, a subclass of QGLWidget. This widget provides functionality for rendering of Coin scene graphs and translation of QEvents into SoEvents. Using this widget is as easy as using any other QWidget.

Qt Designer Plugin

Quarter also comes with a plugin for Qt Designer, a Qt tool for designing and building GUIs. Once you install Quarter, the QuarterWidget becomes accessible in Qt Designer, and you can include it in the user interfaces you create. The plugin facility also provides you with the capability of dynamically loading UI files containing a QuarterWidget in your application.

By using Coin, Qt and Quarter to build your 3D graphics applications, you have the power to write software that is portable across the whole range of UNIX, Linux, Microsoft Windows, and Mac OS X operating systems, from a 100% common code base.

For a small, completely stand-alone usage example on how to initialize the library and set up a viewer instance window, see the following code:

#include <QtGui/QApplication>
#include <Inventor/nodes/SoBaseColor.h>
#include <Inventor/nodes/SoCone.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Quarter/Quarter.h>
#include <Quarter/QuarterWidget.h>
using namespace SIM::Coin3D::Quarter;
main(int argc, char ** argv)
QApplication app(argc, argv);
// Initializes Quarter library (and implicitly also the Coin and Qt
// libraries).
// Make a dead simple scene graph by using the Coin library, only
// containing a single yellow cone under the scene graph root.
SoSeparator * root = new SoSeparator;
SoBaseColor * col = new SoBaseColor;
col->rgb = SbColor(1, 1, 0);
root->addChild(new SoCone);
// Create a QuarterWidget for displaying a Coin scene graph
QuarterWidget * viewer = new QuarterWidget;
// make the viewer react to input events similar to the good old
// ExaminerViewer
// Pop up the QuarterWidget
// Loop until exit.
// Clean up resources.
delete viewer;
return 0;
The QuarterWidget class is the main class in Quarter. It provides a widget for Coin rendering....
Definition QuarterWidget.h:71
virtual void setSceneGraph(SoNode *root)
Definition QuarterWidget.cpp:492
void setNavigationModeFile(const QUrl &url=QUrl(DEFAULT_NAVIGATIONFILE))
Definition QuarterWidget.cpp:1023

More Examples