Hi,

I've written a little program with a Qt-GUI and a QmitkStdMultiWidget  
for displaying my data. I'm using Visual Studio 2008, Qt 4.6.2 and an  
one week old svn-version of mitk. The debug version of my program runs  
perfect. But if I try to run the release version I get the following  
error message:
"Debug Error!

Program: myApp.exe
Module: 4.6.2
File: global\qglobal.cpp
Line: 2230

QWidget: Cannot create a QWidget  when no GUI is being used"

I figured out that it is caused by the line "multiWidget = new  
QmitkStdMultiWidget(this);"

My main class:
int main(int argc, char *argv[])
{
         QApplication app(argc, argv);

         // Register Qmitk-dependent global instances
         QmitkRegisterClasses();

         myApp window(NULL);
         window.show();
         return app.exec();
}

and the function were the error is caused:

myApp::myApp(QWidget *parent)
         : QWidget(parent)
{
         setStyle(new QPlastiqueStyle);
         setWindowTitle(tr("ReRTEx"));
         setMinimumHeight(600);
         setMinimumWidth(600);
         setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
         setWindowIcon(QIcon(tr("icon1.ico")));

         menuBar = new QMenuBar(this);

         CreateActions();
         CreateMenus();

         multiWidget = new QmitkStdMultiWidget(this);
         multiWidget->DisableColoredRectangles();
         multiWidget->DisableDepartmentLogo();

         mainLayout = new QVBoxLayout();
         mainLayout->addLayout(new QHBoxLayout());
         mainLayout->addWidget(multiWidget);
         mainLayout->setContentsMargins(5,30,5,5);

         setLayout(mainLayout);
}

The error doesn't occur in any of the tutorials.
Can you help me, please?

Claudia


------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to