PDA

View Full Version : how can I know if control pressed inside mousePressEvent ?



ricardo
3rd July 2009, 17:30
Hi!

Doing a small CAD program I'd like to know the best way to discover is control is pressed when user cliks screen. I mean, I'm trying to create soething like corel draw, where if you press conotrol you may select several objects.

Is there any method to know if control is pressed inside mousePressEvent?
Or should I reimplement keyPresed and keyReleased and create a flag (m_control_is_pressed) and test it inside mousePressEvent?

What do you think?

Thanks in advance.

Lykurg
3rd July 2009, 19:18
QMouseEvent::modifiers() or QGraphicsSceneMouseEvent::modifiers()?

ricardo
3rd July 2009, 21:05
QMouseEvent::modifiers() or QGraphicsSceneMouseEvent::modifiers()?

That's what I was looking for. Thanks.