[Qt-interest] Use different cursor when different modifier key is pressed
Sean Harmer
sean.harmer at maps-technology.com
Tue Nov 10 18:58:51 CET 2009
On Tuesday 10 Nov 2009 15:33:39 Stephen Chu wrote:
> > > Yes. I think that's the way to go. But which object should I install
> > > the event filter to?
> >
> > That depends on your application, and you're not telling much about it.
> > You could even install it on your application object, if you'd like this
> > to work application wide. Otherwise, perhaps the QGraphicsView would be
> > a good candicate? That may work well, but if you have more than one view
> > on the scene, that will be a problem.
>
> QGraphicsView doesn't seem to get keyPress/Release events. So I
> installed the filter to the window and it works pretty well now.
I think the viewport() gets the events. Try installing it there instead of on
the QGraphicsView itself.
Cheers,
Sean
More information about the Qt-interest-old
mailing list