[Solved] QVTKWidgetPlugin makes QT creator crash
-
wrote on 30 Oct 2014, 17:02 last edited by
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
-
wrote on 30 Oct 2014, 23:18 last edited by
How do you mean the Qt version used to build the plugin? I built the plugin when building VTK (6.1) and placed it into the plugin folder of Qt Creator 3.2.2 running Qt 5.3.2. I can send you the error when I get to the office tomorrow morning.
Cheers
-
wrote on 31 Oct 2014, 08:17 last edited by
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 ?
-
wrote on 31 Oct 2014, 22:27 last edited by
Still 5.3.2, the current version of Qt.
-
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 ?
-
wrote on 3 Nov 2014, 09:43 last edited by
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 :)
4/9