[vtkusers] QVTKWidget + Qt Creator/ Qt Designer question

Cory Quammen cquammen at cs.unc.edu
Wed Mar 3 12:43:38 EST 2010


Prashanth,

I've followed both paths Eric and Pawel have described, and I see no
discernable benefit to installing the QVTKWidget plugin in Designer.
The promotion way described by Pawel should get you up and running
faster than if you add the plugin.

Cory

On Wed, Mar 3, 2010 at 8:28 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
> Hey Prashanth,
>
> You should also be able to add a QVTKWidget directly within Qt Designer.
>
> Since you have built VTK with those QT options, it should have generated a library file called libQVTKWidgetPlugin... If you place a copy of this in the [QTinstallDir]/plugins/designer/ directory, the QVTKWidget should show up at the bottom of the Widget Box (that list of widgets panel on the left in Designer). There should also be a CMake option called VTK_INSTALL_QT_PLUGIN_DIR in which you can place that .../plugins/designer directory path and the widget plugin library file should be placed in the right spot automatically.
>
> Good luck,
> -Eric
>
> ------------------------------------------------------
> Eric E Monson
> Duke Visualization Technology Group
>
>
> On Mar 3, 2010, at 7:15 AM, Paweł~~Łubniewski wrote:
>
>> You add a normal QWidget to the form (adjust its parameters etc.),
>> right-click on it, choose "Promote to..." and fill:
>> - name of the base class: QWidget (should be already selected)
>> - name of the promoted class: QVTKWidget
>> - header file: QVTKWidget.h
>> - header file global: checked (if so, Qt Designer generate #include
>> with <> braces)
>> And that's it.
>> Pawel~
>>
>> 2010/3/3 Prashanth Ravindran <prashanthravindran at gmail.com>
>>>
>>> Hi-
>>>
>>> I am a QT Newbie and would like to embed various visualizations in a QT Gui App. I have VTK  compiled with QT support (VTK_USE_GUISUPPORT && VTK_USE_QT on). All the examples build fine. However I would like to start using QTCreator and QTDesigner to make my QT Forms. Is there a way of exposing QVTKWidget in these tools, so that I can design QT/VTK hybrid GUI's visually.
>>>
>>> Sorry if this question has already been answered, my searches threw up no actionable results.
>>>
>>> Thanks,
>>> -- Prashanth
>>>
>>> _______________________________________________
>>> 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
>>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
>



-- 
Cory Quammen
Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen



More information about the vtkusers mailing list