[vtkusers] Adding a text widget into qvtk

David Doria daviddoria at gmail.com
Mon Nov 26 18:24:52 EST 2012


On Mon, Nov 26, 2012 at 6:16 PM, Rodrigo Lovera <lobo.theslayer at gmail.com>wrote:

> Hi,
>
> I already know how to setup vtk/qt using the qvtkwidget and got it to work
> the text display, well i'm using a pushButton in Qt to activate a text
> widget which will appear on my qvtkwidget as well as my volume rendering.
> My point now is how can I do to interactively write a commentary or some
> annotation on it.
>
> I mean, I'm working with medical images and is kind of required to add
> some labels or commentaries in some views. Is there any direct way to add
> the textwidget and start typing whatever you want on the qvtkwidget?? or
> maybe a way to get the text of an texteditbox from qt??? I'm really stucked
> at this point.
>
>
> Rodrigo


You should use a QLineEdit and connect it's textChanged() signal to a slot
that updates the vtkTextWidget and re-renders the scene:

http://doc.qt.digia.com/qt/qlineedit.html#textChanged

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121126/51e7d42f/attachment.htm>


More information about the vtkusers mailing list