Home Download Gallery Documentation Developer

# libQGLViewer installation
on Windows

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

Make sure your Qt installation is up to date and running. Try building one of the Qt OpenGL examples first.

Then download and unzip libQGLViewer-2.6.3.zip.

Depending on your environment:

- QtCreator: open the `QGLViewer/QGLViewer.pro` project file and "build all".
- MinGW (available when you install the OpenSource Qt version): launch the Qt Command Prompt from the Start menu and type:

      cd \path\to\libQGLViewer-2.6.3\QGLViewer
      qmake
      mingw32-make

- Visual Studio: install the Qt Visual Studio add-in, open `QGLViewer/QGLViewer.pro` and build the solution *. This page explains how to use Qt with Visual Studio.

Then copy the generated `QGLViewer2.dll` and `QGLViewer2d.dll` to a system shared directory such as `C:\Windows\System32`. An alternative is to copy the `dll` in every executable's directory.

See the compilation with libQGLViewer page for details on examples' compilation.

* You can generate the `.vcproj` file by typing `qmake -t vclib QGLViewer.pro -spec win32-msvc2010` (adapt to your configuration) in a Qt command prompt window.

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.

## 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.

Make sure you are building and using the Release version of `QGLViewer2.dll`. Note that you also have to install `QGLViewer2.dll` in `C:\Windows\System32` (as described above). Copying this file to `$QTDir\bin` sometimes also seems necessary.

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.

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 Friday, July 10, 2015.