[vtkusers] More QT and VTK Problems

Richard Haney cosmoh2o at hotmail.com
Mon Aug 21 20:22:58 EDT 2006


Please Help,

I have moved the libQVTKWidgetPlugin.dll to the Qt_Designer/plugins 
directory (Qt version 4.1.4) and built a quick .ui file based on the dialog 
form, called myFile.ui with only a single QVTK window (pulled from the 
plugin).  I saved a main.cpp file with it in the same directory that looks 
like the following:

#include "ui_myFile.h"
#include <QApplication>

int main(int argc, char *argv[]) {
  QApplication app(argc, argv);
  QDialog *window = new QDialog;
  Ui::Dialog ui;
  ui.setupUi(window);
  window->show();
  return app.exec();
}

The .pro file looks like the following:
TEMPLATE = app
TARGET +=
DEPENDPATH += .
INCLUDEPATH += .

# Input
FORMS += designer.ui
SOURCES += main.cpp

When I run "qmake", the MakeFile is created with no errors, however when I 
run "make" I get the following errors:

C:\Qt\4.1.4\myProject\proj2>make
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory `C:/Qt/4.1.4/myProject/proj2'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT 
-DQT_DLL
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN 
-I"C:/Qt/4.1.4/
include/QtCore" -I"C:/Qt/4.1.4/include/QtGui" -I"C:/Qt/4.1.4/include" -I"." 
-I"C
:/Qt/4.1.4/include/ActiveQt" -I"tmp\moc\debug_shared" -I"." 
-I"..\..\mkspecs\win
32-g++" -o tmp\obj\debug_shared\main.o main.cpp
In file included from main.cpp:1:
ui_designer.h:4:24: QVTKWidget.h: No such file or directory
In file included from main.cpp:1:
ui_designer.h:23: error: ISO C++ forbids declaration of `QVTKWidget' with no 
typ
e
ui_designer.h:23: error: expected `;' before '*' token
ui_designer.h: In member function `void Ui_Dialog::setupUi(QDialog*)':
ui_designer.h:50: error: `qvtkWidget' undeclared (first use this function)
ui_designer.h:50: error: (Each undeclared identifier is reported only once 
for e
ach function it appears in.)
ui_designer.h:50: error: `QVTKWidget' has not been declared
mingw32-make[1]: *** [tmp\obj\debug_shared\main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.1.4/myProject/proj2'
mingw32-make: *** [debug-all] Error 2

I am very new to QT-VTK and would appreciate any help.  I used Qt4.1.4 and 
VTK-5.0.1 and used the latest version of Cmake (2.4.3) to build the VTK with 
"GUISUPPORT" so that the QT plugin would be built.

Thanks in advance for ANY help/hints.





More information about the vtkusers mailing list