Important: Please read the Qt Code of Conduct -

[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 @

    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

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Which version of Qt did you use to build the plugin ?

    The error report would indeed be useful

  • 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.


  • 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

  • Lifetime Qt Champion

    Your Qt Creator was built with Qt 5.3.2, what version of Qt are you using currently ?

  • Still 5.3.2, the current version of Qt.

  • Lifetime Qt Champion

    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 (

  • Lifetime Qt Champion

    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 :)

Log in to reply