[Qt-interest] QGraphicsScene::keyPressEvent() only gets Ctrl-modified key presses

Josiah Bryan jbryan at productiveconcepts.com
Fri Oct 16 17:12:54 CEST 2009


Hey all -

Weird problem just came up. I've got a class that inherits from 
QGraphicsScene and reimplements keyPressEvent() to catch F2 and a few 
other keys. It also catches Ctrl+C et al to do copy paste.

The odd thing is, keyPressEvent() is ONLY called when the Ctrl modifier 
is pressed! Just pressing F2 or any other key by itself does not trigger 
the keyPressEvent().

I even installed an event filter on the scene just to see if that sees 
anything - still nothing. Even the event filter only gets ctrl-modified 
keys.

Any ideas how to debug or fix this odd problem?

Thanks!
-josiah

-- 

-=-=-=-=-=-=-=-=-=-=-=-=-
Josiah Bryan
Productive Concepts, Inc.
jbryan at pciint.com
(765) 964-6009, ext. 224




More information about the Qt-interest-old mailing list