> Date: Thu, 9 Feb 2006 22:53:05 +0800 (CST)
> From: Patrik Spring <[hidden email]>
> Subject: [vtkusers] how implentment drag and drop operation from
> QWidget to QVTKWidget???
>To: [hidden email] >
> Who can give me a c++ example to implentment that QVTKWidget get a dragEnterEvent or dropEvent come from QT?
> In QVTKWidget.cxx, I see dropEvent() and dragEnterEvent() , but I try my best can not implentment this operation!!
> Must I reimplentment these method????
> Thank advanced!
I don't have an example I can give you, but...
I can think of 3 different ways you can do it.
1. reimplement those methods
2. use an event filter
3. QVTKWidget's implementation of dropEvent() and dragEnterEvent() will forward those events to the interactor style.
You can make your own ProcessEvents() function for your subclass of an interactor style. Set that ProcessEvents as your callback. And call AddObserver on the interactor to get those events. The advantage here is that you can keep all your event handling in one place, instead of two places which method 1, 2 would do.