Assigning object a 2D text label

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Assigning object a 2D text label

Mads M. Hansen
Based on the example at
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower

I have tried to attach a text label to a number of objets (line
106-149), however
when the render method is called  (line 80 in the attached file)
I get this message:

/xxx/VTK-8.0.0/GUISupport/Qt/QVTKInteractor.cxx, line 147
QVTKInteractor (0x1ea3da0): QVTKInteractor cannot control the event loop.

and no text appeares on screen. I have been unable to figure out how
to sort it out :(

.. Mads

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers

mainwindow.cpp (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Assigning object a 2D text label

Sankhesh Jhaveri-2

Hi Mads,

The error originates from the following line:

    interactor->Start();

You don’t need to start the event loop manually with the QVTKInteractor. QVTKWidget would use Qt’s event loop.
Just remove the Start() call.

Hope that helps.

Sankhesh


On Wed, Aug 16, 2017 at 7:43 AM Mads M. Hansen <[hidden email]> wrote:
Based on the example at
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower

I have tried to attach a text label to a number of objets (line
106-149), however
when the render method is called  (line 80 in the attached file)
I get this message:

/xxx/VTK-8.0.0/GUISupport/Qt/QVTKInteractor.cxx, line 147
QVTKInteractor (0x1ea3da0): QVTKInteractor cannot control the event loop.

and no text appeares on screen. I have been unable to figure out how
to sort it out :(

.. Mads
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
--
Sankhesh Jhaveri
Sr. Research & Development Engineer | Kitware | (518) 881-4417

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Assigning object a 2D text label

Mads M. Hansen
Shankhesh,
thank you that got rid of the error - but did not make the text appear.

.. Mads

2017-08-16 16:10 GMT+02:00 Sankhesh Jhaveri <[hidden email]>:

> Hi Mads,
>
> The error originates from the following line:
>
>     interactor->Start();
>
> You don’t need to start the event loop manually with the QVTKInteractor.
> QVTKWidget would use Qt’s event loop.
> Just remove the Start() call.
>
> Hope that helps.
>
> Sankhesh
>
>
> On Wed, Aug 16, 2017 at 7:43 AM Mads M. Hansen <[hidden email]> wrote:
>>
>> Based on the example at
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Follower
>>
>> I have tried to attach a text label to a number of objets (line
>> 106-149), however
>> when the render method is called  (line 80 in the attached file)
>> I get this message:
>>
>> /xxx/VTK-8.0.0/GUISupport/Qt/QVTKInteractor.cxx, line 147
>> QVTKInteractor (0x1ea3da0): QVTKInteractor cannot control the event loop.
>>
>> and no text appeares on screen. I have been unable to figure out how
>> to sort it out :(
>>
>> .. Mads
>> _______________________________________________
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>
> --
>
> Sankhesh Jhaveri
>
> Sr. Research & Development Engineer | Kitware | (518) 881-4417
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers