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

Xiaopeng Yang yxp233 at postech.ac.kr
Fri Jun 24 21:36:21 EDT 2011


Hi Clint,

 

Actually I tried to use QVTKInteractor as follows:

 

imageViewer1_open->SetupInteractor(this->ui->qvtkWidget->GetRenderWindow()->GetInteractor());

…

this->ui->qvtkWidget->GetRenderWindow()->GetInteractor()->Start();

 

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

 

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,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110625/07eb58c7/attachment-0001.htm>


More information about the Insight-users mailing list