Home Documentation Download Examples Developer

# libQGLViewer installation
on Windows

The installer allows you to evaluate the library from its demonstration examples and its documentation and to start creating your own programs. The library and the examples were here compiled using (and can be used with) MinGW and the open source version of Qt.

Download the libQGLViewer installer

This source code is released under the GPL license. If you are using libQGLViewer in a commercial application, you need to purchase a libQGLViewer commercial license.

## Compilation from the sources

If you want to compile the library from its sources, first download and install the latest Qt version from the Qt Software web site.

Then download and unzip libQGLViewer-2.3.4.zip.

• If you use the MinGW compiler (available when you install the OpenSource Qt 4 version), launch the Qt 4.x Command Prompt from the Start menu and type:

    cd \path\to\libQGLViewer-2.3.4\QGLViewer
    qmake
    make

• If you use the Qt integration in Visual Studio (provided with the commercial Qt edition), open `QGLViewer/QGLViewer.pro` using the Qt - Open solution from .pro file menu and generate the solution*.

Copy the resulting `QGLViewer2.dll` to a system shared directory such as `C:\Windows\System32`. An other option is to copy it to every executable's directory.

Then see the compilation with libQGLViewer page for details on examples' compilation.

* A `LNK4068 /MACHINE` warning message can be fixed by editing Project - Properties of QGLViewer - Configuration properties - Link editor - Advanced - Target Computer.

Visual Studio 6 only: Use File-Open workspace to open the `.dsp` generated file, and select Release as the Build/Active Configuration.

If needed, the `.vcproj` file can be generated from the `.pro` file by typing `qmake -t vclib QGLViewer.pro` in a Qt command line.

## Installation of the designer plugin

The compilation and installation of the QGLViewer designer plugin is optional. It eases the creation of user interfaces that feature a QGLViewer widget using Qt designer. Simply drag and drop the QGLViewer icon that appears in the designer's `Display Widgets` tab to add it to your interface:

When added to your user interface, the widget displays the standard spiral, which can be manipulated when you test your interface. All the viewers' signals and slots are available and can be connected to the rest of your interface.

To compile the plugin, open the `designerPlugin.pro` file to create your workspace. Install the resulting plugin library (`qglviewerplugin.dll`) in `$QTDIR\plugins\designer` and/or `C:\Program Files\QtSoftware\Qt VS Integration\plugins` to use it with the Visual Studio integrated designer. Note that you also have to install the `QGLViewer2.dll` in `C:\Windows\System32` (as described above). Although successfully tested, this procedure does not seem to be sufficient with certain configurations, any explanation is more than welcome.

To create your own designer plugin for your derived QGLViewer class, start from this code and change a few lines as explained in the source.

With Qt version 3, an alternative to this plugin is to add a "Custom Widget" using the Tools/Custom designer menu. Select Load Descriptions... and provide the `qglviewer.cw` custom widget description file, located in the QGLViewer header files directory. You can customize this description for your own classes, with your own signals and slots and the header file path.

See the interface example for an illustration of a user interface that includes a QGLViewer.

Please let me know if you encounter installation problems.

Last modified on Monday, August 31, 2009.