[vtkusers] QVTKWidget and setCursor()

(Samuel) Byeongjun Park byeongjun.park at case.edu
Wed May 5 11:33:20 EDT 2010


I found the answer. 

Conclusively it doesn't matter of the vtk versions.

 

Thank Clint.

I started tracing my program from vtkXOpenGLRenderWindow.cxx

 

I found the cursor was changed by vtkOrientationMarkerWidget object.

I found that the InteractorObserver of vtkOrientationMarkerWidget kept
changing my mouse cursor

when my mouse enter into the viewport of the vtkOrientationMarkerWidget
objects.

 

But I wrote SetInteractiveOff() in my code. So I traced a little bit more
and

found SetInteractiveOff() should be followed AFTER SetInteractor() and
SetEnabled() .

So, the program code should be sequenced like below

 

vtkOrientationMarkerWidget *pMakrer = vtkOrientationMarkerWidget::New();

.

pMarker->SetOrientationMarker(pCube);

pMarker->SetInteractor(.);

pMarker->SetEnabled(1);

pMarker->SetInteractive(0);

.

 

May be it would be much helpful if a warning sentence in
vtkOrientationMarkerWidget is added in the 

document.

 

Thanks,

 

Sam Park.

 

From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of Clinton Stimpson
Sent: Wednesday, May 05, 2010 9:29 AM
To: vtkusers at vtk.org
Subject: Re: [vtkusers] QVTKWidget and setCursor()

 

On 05/05/2010 07:11 AM, (Samuel) Byeongjun Park wrote: 

Hi all,

I found one problem related to mouse cursor.
I changed mouse cursor using QVTKWidget's setCursor() function which
is inherited from QWidget.


It works fine. One interesting thing I found is that VTK 5.0.4 works Okay 
but when I upgraded to VTK5.4.2, somehow mouse cursor return to arrow
cursor.

Both VTK 5.0.4 and 5.4.2 works when I change the mouse cursor using
setCursor().
However, for 5.4.2 when the QVTKWidget window is once hided by other window
and
raised to top, mouse cursor returned to arrow cursor for some QVTKWidgets
(not all the time, not all QVTKWidgets).
It never happen in 5.0.4.


I compared two versions of QVTKWidget source codes, but there was no
significant difference.




Is there any suggestion where I should dig?
My system is running Linux 64bit with NVidia GL library.


Perhaps the change in behavior is from vtkXOpenGLRenderWindow.cxx.
I suggest looking at where it calls XDefineCursor() to see if that causes
your cursor issues.

Clint

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


More information about the vtkusers mailing list