QGLViewer/QGLViewer.pro
.dsp
generated
file, and select Release as the Build/Active ConfigurationQGLViewer211.dll
* in a library
directory, such as C:\WINDOWS\system32
(or C:\WINNT\system32
with Windows
2000). Alternately, you can copy it to every application directory
If your Qt version is lower than 3.1, you have to install the GLUT library in order to have text display. Add
the paths to GLUT in your Include
and Library
Project-Properties*, and copy glut32.dll
in a
library directory (as in item 6 above).
staticlib
in the CONFIG
line of QGLViewer.pro
to compile
a static library instead of a dll.
* Names are given in .NET standards, and differ from those of Visual 6. Here is a correspondence table:
.NET | Visual Studio 6 |
---|---|
Tools - Add-Ins manager - QtNet | Tools - Customize - Add-ins and Macro Files/QMsDev Add in |
Open Qt Project | Generate Qt Project |
QGLViewer211.dll | QGLViewer2.dll or QGLViewer.dll |
Project-Properties-C/C++-General-Additional Include Directories | Tools-Options-Directories-Include files |
Project-Properties-Linker-General-Additional Library Directories | Tools-Options-Directories-Library files |
Program Files
). You also need to download and install the GLUT library as explained above.
As an alternative, you can use the free Qt 4 GPL version, available on the Trolltech web site. It uses the MinGW compiler and is not directly usable with Visual Studio.
To compile with Qt 2.3, follow the installation procedure described above but openQGLViewer.Qt2.3.pro
instead in step 3.
If you use Visual 6:
Project created
dialog is displayed when you open QGLViewer.pro
,
try to restart Visual Studio with Administrator privileges./GX /GR
in Project-Settings-C-C++, Project Options for
exceptions and dynamic casts.glut32.lib
to Projects-Settings-Link-Object/library modules.illegal call
error messages during the compilation of
className()
in moc files. Simply remove the first qglviewer::
just after
strcmp(
and recompile..dsp
file using:
tmake -win32 -t vclib -o QGLViewer.dsp QGLViewer.proOpen the file using .NET and accept all convertions into the
.vcproj
.
VRenderInterface.ui
and select
Properties. Replace uic
by %QTDIR%\bin\uic
in Custom Build,
Build command option.QT_DLL
from the C++ preprocessor properties.initializeSnapshotFormats()
line in qglviewer.cpp defaultConstructor()
.NO_VECTORIAL_RENDER
define (snapshots are not supported with .NET and Qt 2.3).qglviewer.cpp
:
QString QString::null; QStringData * QString::shared_null; QChar QChar::null; QApplication * qApp;
cd libQGLViewer-2.1.1-7\QGLViewer qmake makeCopy the resulting
dll
(create in the release
directory) to a system
shared directory such as C:\WINDOWS\system32
(or C:\WINNT\system32
with
Windows 2000). Alternately, you can copy it to every application directory
Use the same procedure to compile the examples (the .exe
is created in the release
directory as well):
cd ..\examples\anyExampleDirectory qmake makeSee the Qt installation section for details on Qt.
thread
from the
CONFIG
line in QGLViewer.pro
.
Then compile QGLViewer as explained in the Unix installation page.
You should rename the generated cygQGLViewer-1.dll
file to
libQGLViewer.dll
and copy it in the C:\WINDOWS\system32
directory. Note
that cygqt-3.dll
and cygqui-1.dll
(located in $(QTDIR)/bin
or
$(QTDIR)/lib
) should also be copied in that directory. Thanks Jean-Gui for these
details.
This page details how to patch Qt 2.3 to make it work with .NET.
Visual Studio users must check the Tools/Customize/Add-ins and Macro Files/QMsDev Add in box in order to use Qt with Visual Studio.There are ways to integrate the non-commercial Qt 4 version into Visual Studio. Browse the web for up-to-date advices.
designerPlugin.pro
file to create your workspace. Compile it and install the resulting
library in $QTDIR\plugins\designer
(may require administrator privileges).
Such a plugin eases the creation of user interfaces that feature a QGLViewer using designer. It
makes a GLViewer icon appear in the designer's Display
widget tab, as a standard Qt
widget. When added to your user interface, the widget displays the standard spiral, which can be
manipulated when you test your interface (using Ctrl+T
or Ctrl+R
with Qt 4).
All the viewers' signals and slots are available and can be connected to the rest of your interface.
Start from this code to create your own designer plugin for your derived QGLViewer classes. See the code of the plugin for details.
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 with your own signals and slots and change the header
file path.
Please let me know if you encounter installation problems.