[vtkusers] opening QVTKWidget in Qt

Prathamesh Kulkarni prathameshmkulkarni at gmail.com
Wed Jun 30 19:57:51 EDT 2010


Hi Henning,

Thanks for the quick snippet. I could go ahead and do it, however, I
need to add other stuff in the Main Window  besides the QVTKWidget.

Anyways, I did not have QVTKPluginWidget.dll probably because I had
not build the VTK INSTALL. I am not sure though.

I dropped this dll in Qt\Plugins\Designer\. Now I am able to promote a
QWidget to QVTKWidget in Qt Designer. I wonder why not from Qt
Creator.

Prathamesh

On Wed, Jun 30, 2010 at 3:59 PM, Henning Meyer <tutmann at gmail.com> wrote:
> 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