Maverick/Developers FAQ

From KitwarePublic
< Maverick
Revision as of 02:03, 15 September 2009 by Aylward (talk | contribs) (New page: == Not a valid Qt Plugin == * Main reasons ** Compile the plugin (and all the dependent DLLs ) in Release mode as QDesigner is run in release ** Copy the created plugin dll into a directo...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Not a valid Qt Plugin

  • Main reasons
    • Compile the plugin (and all the dependent DLLs ) in Release mode as QDesigner is run in release
    • Copy the created plugin dll into a directory QDesigner knows about (by default: %QTDIR%/plugins/designer, but you can set QT_PLUGIN_PATH instead
    • Make sure QDesigner has access to all the dependant DLLs (by setting the PATH), you can use the freeware DependencyWalker to know which DLL the plugin needs
    • if QtDesigner crashes when loading your ui form, then make sure all your dlls (and paths) are in release (the best way to do it is to recompile in Release mode

Why my module is not working

  • The Application logic is missing ?
myApplicationLogic = vtkSlicerApplicationLogic::New();
myApplicationLogic->SetMRMLScene( myVTKMRMLScene );
myApplicationLogic->ProcessMRMLEvents( myVTKMRMLScene, vtkCommand::ModifiedEvent, NULL);  
myApplicationLogic->SetAndObserveMRMLScene ( myVTKMRMLScene );
myApplicationLogic->CreateProcessingThread();
    • The application logic can be used by all the modules in your application:
...
myModule->ReceiveApplicationLogic(myApplicationLogic);
...
mySecondModule->ReceiveApplicationLogic(myApplicationLogic);
...
myThirdModule->ReceiveApplicationLogic(myApplicationLogic);
...
  • The module is running but never "quit" ?
    • A timer should be used to check the status of your module. In QT:
QTimer* timer = new QTimer(this);
timer->setInterval(100); //ms 
QObject::connect(timer, SIGNAL(timeout()), this,SLOT( CheckTimeouts()));
timer->start();
void MyApplication::CheckTimeouts()
{
  vtkPulseGenerator::CheckTimeouts();
}