[vtkusers] QT, VTK, and ITK combined program exit problem

Clinton Stimpson clinton at elemtech.com
Fri Jun 24 21:41:10 EDT 2011


On Jun 24, 2011, at 7:36 PM, Xiaopeng Yang wrote:

> Hi Clint,
>  
> Actually I tried to use QVTKInteractor as follows:
>  
> imageViewer1_open->SetupInteractor(this->ui->qvtkWidget->GetRenderWindow()->GetInteractor());
>> this->ui->qvtkWidget->GetRenderWindow()->GetInteractor()->Start();

Don't call Start() for a Qt application.  Use QApplication::exec() in your main() instead.

>  
> However, still the same problem occurred. Could you please let me know what mistakes I made?

I'm not sure why your seed point selection isn't working.

Clint

>  
> Thank you,
>  
> Best regards,
> Xiaopeng
> From: clinton at elemtech.com [mailto:clinton at elemtech.com] 
> Sent: Saturday, June 25, 2011 10:04 AM
> To: Xiaopeng Yang; 'vtk'; insight-users at itk.org
> Subject: Re: [vtkusers] QT, VTK, and ITK combined program exit problem
>  
> If you are using Qt, the event loop should be handled by Qt, not VTK with the iren->start.
> Also be sure to use the QVTKInteractor instead of the type from the factory method vtkRenderWindowInteractor::New.
> 
> Clint
> 
> ----- Reply message -----
> From: "Xiaopeng Yang" <yxp233 at postech.ac.kr>
> Date: Fri, Jun 24, 2011 6:42 pm
> Subject: [vtkusers] QT, VTK, and ITK combined program exit problem
> To: "&apos;vtk&apos;" <vtkusers at vtk.org>, <insight-users at itk.org>
> 
> Hi All,
>  
> I found where the problem is: “iren->Start()”. “iren” is the vtkRenderWindowInteractor I defined in my program. If I delete this sentence “iren->Start()”, then I can close both GUI and console windows without warning message “QObject::killTimers: timers cannot be stopped from another thread”. Otherwise, the problem I described in the previous Email will occur.
>  
> However, for seed point selection, I need “iren->Start()”. Then what should I do to solve the problem?
>  
> Best,
> Xiaopeng
>  
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Xiaopeng Yang
> Sent: Friday, June 24, 2011 4:07 PM
> To: 'vtk'; insight-users at itk.org
> Subject: [vtkusers] QT, VTK, and ITK combined program exit problem
>  
> Dear Users,
>  
> I made a program based on QT, VTK, and ITK. When I run the program, there are GUI window and console window. When I click “exit” button in the GUI window, the GUI window exits but the console window doesn’t. When I click “exit” button in the console window, there is a message: QObject::killTimers: timers cannot be stopped from another thread. If someone already had a similar experience, please could you share your knowledge?
>  
> Thank you very much.
>  
> Best regards,
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110624/bc322ff6/attachment.htm>


More information about the vtkusers mailing list