<div dir="ltr">Hi,<br><br>fedora 20, gcc 4.8.2, x86_64, 3.12.5-302.fc20.x86_64<br><br>When I try and run a Qt application with a libQVTKWidgetPlugin widget on a form, the application fails at runtime with the message:<br>    QWidget::paintEngine: Should no longer be called<br>
<br>I had understood from<br>    <a href="http://vtk.1045678.n5.nabble.com/VTK-6-1-td5722746.html">http://vtk.1045678.n5.nabble.com/VTK-6-1-td5722746.html</a><br>that vtk 6.1 supports qt 5.<br><br>Steps taken:<br>Step 0: Remove existing qt4 libraries (this seems to confuse ccmake if qt4 and qt5 are present at the same time)<br>
sudo yum remove qt4*<br><br>Step 1: Build vtk 6.1 from source (on 1 Jan I downloaded and built the latest vtk 6.1 code from git):<br>sudo yum install git<br>git clone git://<a href="http://vtk.org/VTK.git">vtk.org/VTK.git</a> vtk<br>
mkdir vtkbuild<br>cd vtkbuild<br>ccmake ../vtk<br>c - for configure<br>set CMAKE_BUILD_TYPE to Release<br>set VTK_Group_Qt to ON<br>c - for configure<br>e - to exit help<br>t - for advanced mode<br>Page down to page 12 and modify<br>
Set VTK_QT_VERSION to 5<br>c - for configure<br>&lt;&lt;QT5 folders are now shown&gt;&gt;<br>c - for configure<br>g - for generate<br>&lt;&lt;exits ccmake&gt;&gt;<br>make<br><br>Step 2: Download the latest qt5.2 and QT Creator 3.0 (the Qt Creator packaged with fedora 20 &quot;sudo yum install qt-creator*&quot; see non functional)<br>
download &quot;Qt 5.2.0 for Linux 64-bit (423 MB)&quot; from <a href="http://qt-project.org/downloads">http://qt-project.org/downloads</a><br>and unpack in ~ to give a ~/Qt5.2.0 folder<br><br>Step 3: Copy across libQVTKWidgetPlugin.so<br>
    cp ~/vtkbuild/lib/libQVTKWidgetPlugin.so ~/Qt5.2.0/Tools/QtCreator/bin/plugins/designer/<br>In CT Creator the VTK widget is now visible in the form designer.<br><br>Step 4: Create a new QT project<br>Add QVTKWidgetPlugin to a form<br>
Modify the QT .pro file with<br>    INCLUDEPATH += /home/myk/5.2.0/gcc_64/include/QtWidgets/<br>    INCLUDEPATH += /home/myk/vtk/Rendering/Core/<br>    INCLUDEPATH += /home/myk/vtk/Common/Core/<br>    INCLUDEPATH += /home/myk/vtk/Common/DataModel/<br>
    INCLUDEPATH += /home/myk/vtk/Common/ExecutionModel/<br>    INCLUDEPATH += /home/myk/vtk/Filters/Sources/<br>    INCLUDEPATH += /home/myk/vtk/GUISupport/Qt/<br>    INCLUDEPATH += /home/myk/vtkbuild/Common/Core/<br>    INCLUDEPATH += /home/myk/vtkbuild/Common/DataModel/<br>
    INCLUDEPATH += /home/myk/vtkbuild/Common/ExecutionModel/<br>    INCLUDEPATH += /home/myk/vtkbuild/Filters/Sources/<br>    INCLUDEPATH += /home/myk/vtkbuild/GUISupport/Qt/<br>    INCLUDEPATH += /home/myk/vtkbuild/Interaction/Style/<br>
    INCLUDEPATH += /home/myk/vtkbuild/Rendering/Core/<br>    INCLUDEPATH += /home/myk/vtkbuild/Rendering/OpenGL/<br>    LIBS += -L/home/myk/vtkbuild/lib<br>    unix: LIBS += -lvtkCommonCore-6.1<br>    unix: LIBS += -lvtkCommonExecutionModel-6.1<br>
    unix: LIBS += -lvtksys-6.1<br>    unix: LIBS += -lQVTKWidgetPlugin<br>    unix: LIBS += -lvtkChartsCore-6.1<br>    unix: LIBS += -lvtkViewsQt-6.1<br>    unix: LIBS += -lvtkInteractionWidgets-6.1<br>    unix: LIBS += -lvtkInfovisCore-6.1<br>
    unix: LIBS += -lvtkRenderingCore-6.1<br>    unix: LIBS += -lvtkRenderingOpenGL-6.1<br>    unix: LIBS += -lvtkImagingCore-6.1<br>    #unix: LIBS += -lvtkIO-6.1<br>    #unix: LIBS += -lvtkFiltering-6.1<br>    unix: LIBS += -lvtklibxml2-6.1<br>
    unix: LIBS += -lvtkDICOMParser-6.1<br>    unix: LIBS += -lvtkpng-6.1<br>    unix: LIBS += -lvtktiff-6.1<br>    unix: LIBS += -lvtkzlib-6.1<br>    unix: LIBS += -lvtkjpeg-6.1<br>    unix: LIBS += -lvtkalglib-6.1<br>    unix: LIBS += -lvtkexpat-6.1<br>
    unix: LIBS += -lvtkverdict-6.1<br>    unix: LIBS += -lvtkmetaio-6.1<br>    unix: LIBS += -lvtkNetCDF-6.1<br>    unix: LIBS += -lvtksqlite-6.1<br>    unix: LIBS += -lvtkexoIIc-6.1<br>    unix: LIBS += -lvtkftgl-6.1<br>
    unix: LIBS += -lvtkfreetype-6.1<br>    unix: LIBS += -lvtkFiltersSources-6.1<br>    unix: LIBS += -lvtkGUISupportQt-6.1<br><br>And then add the following to the QT Creator build environment:<br>    LD_LIBRARY_PATH<br>
with a value of:<br>    /home/myk/vtk/GUISupport/Qt/<br>as per:<br>    <a href="http://www.qtforum.org/article/18473/tutorial-for-using-qt-with-vtk.html">http://www.qtforum.org/article/18473/tutorial-for-using-qt-with-vtk.html</a><br>
<br>Step 5: Run the application.  The following is visible in the Application Output window<br>    Starting /home/myk/build-FrontEnd-Desktop-Release/FrontEnd...<br>    QWidget::paintEngine: Should no longer be called<br>    The program has unexpectedly finished.<br>
    /home/myk/build-FrontEnd-Desktop-Release/FrontEnd crashed<br><br>Any pointers would be appreciated.<br><br>Thanks and regards<br>Michael<br></div>