[vtkusers] opening QVTKWidget in Qt

Henning Meyer tutmann at gmail.com
Wed Jun 30 16:59:34 EDT 2010


I had the same issues.
I ended up using a text editor and modified my ui-File myself.

Have a look at:
VTK/Examples/GUI/Qt/SimpleView/uiSimpleView4.ui

You just need a:
      <item>
       <widget class="QVTKWidget" name="vtkWidget" />
      </item>

In the bottom also add:
<customwidgets>
  <customwidget>
   <class>QVTKWidget</class>
   <extends></extends>
   <header>QVTKWidget.h</header>
   <container>0</container>
   <pixmap></pixmap>
  </customwidget>
 </customwidgets>


If modified properly (like in the example) the ui will open without
error is  Qt Creator and also compile in the CMake Toolchain.

Henning


2010/6/30 Prathamesh Kulkarni <prathameshmkulkarni at gmail.com>:
> I am able to do that too, however I cannot promote a QWidget to
> QVTKWidget in Qt Creator in any way. Therefore I am not able to build
> my own GUI application using QVTKWidget.
>
> On Wed, Jun 30, 2010 at 1:57 PM, John Drescher <drescherjm at gmail.com> wrote:
>> On Wed, Jun 30, 2010 at 2:50 PM, Prathamesh Kulkarni
>> <prathameshmkulkarni at gmail.com> wrote:
>>> Al I am getting in a debud build of vtk is the following:
>>>
>>> in the directory C:\VTK\bin\GUISupport\Qt\QVTKWidgetPlugin.dir\Debug:
>>>
>>> moc_Q4VTKWidgetPlugin
>>> mt.dep
>>> Q4VTLWidgetPlugin
>>> Q4VTLWidgetPlugin.embed.manifest
>>> Q4VTLWidgetPlugin.intermidiate.manifest
>>>
>>> However, none of these is helping me, in any way to have a QVTKWidget
>>> in my .ui file. I get the same error :  Cannot open include file
>>> QVTKWidget.h: no such file or directory. :(
>>>
>>
>> This works in my projects with the standard
>>
>> FIND_PACKAGE( VTK REQUIRED )
>> INCLUDE( ${VTK_USE_FILE} )
>>
>> in my CMakeLists.txt file for my application.
>>
>> John
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list