[Solved] QVTKWidgetPlugin makes QT creator crash
-
I'm trying to use VTK in Qt Creator.
In Qt Designer, I have copied thelibQVTKWidgetPlugin.dylib into the plugin directory. Now I can create QVTKWidgets in Designer.
However, when I copy libQVTKWidgetPlugin.dylib into the
@[QT dir]/QT Creator.app/Contents/Plugins/designer @folder and boot up QT Creator, it crashes before loading with the error "Qt Creator quit unexpectedly" (I can attach the full error if necessary).
Similarly, when I try to promote a QWidget to a QVTKWidget in the designer tab, any program I create with the QVTKWidget crashes with the same error.
Why is this?
The QT GUI examples included with VTK work with CMake.
My specs are: Mac OS X 10.10, VTK 6.1 (release mode, BUILD_SHARED_LIBS on, vtk_GUISupportQt on) Qt Creator 3.2.2 with Qt 5.3.2
Thanks in advance
-
Hi and welcome to devnet,
Which version of Qt did you use to build the plugin ?
The error report would indeed be useful
-
-
Ok the error is pretty lengthy but it is attached beneath. It happens whenever I load the *.ui file in the editor (i.e. bring up the design tab).
Thanks for the help
-
Your Qt Creator was built with Qt 5.3.2, what version of Qt are you using currently ?
-
From your error log it seems that Qt Creator is trying to access a null pointer. Can you run Qt Creator from the command line with QT_DEBUG_PLUGINS set to 1 to see if you have some more information about what happens ?
-
Running with QT_DEBUG_PLUGINS, I found the error:
@Error: no override found for 'vtkRenderWindow'@
With a quick google, I found that before any #include lines in Qt Creator, you need to add:
@#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)
#define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)@Placing the libQVTK file in the designer folder of Creator plugins still causes a crash, but promoting the QWidget manually works. As long as one method works, I'm happy!
Cheers for the help
Source (http://stackoverflow.com/questions/18642155/no-override-found-for-vtkpolydatamapper)
-
Nice !
Thanks for sharing !
Can you also please update the thread title prepending [solved] so other forum users may know a solution has been found :)