PDA

View Full Version : QDoubleSpinWidget & DragDrop+ContextMenu



prashant
12th September 2009, 17:28
Hi,

I am sub classing QDoubleSpinWidget and adding drag n drop functionality plus a context menu. The drag event is created in mouseMoveEvent.

Problem
When I start the drag from the white bg where the number is written, drag doesn't work, how ever when I start the drag precisely from the boundary of widget or from spinner buttons, drag work.

It's because when you press mouse left button on the white area, the field is ready for input and ignoring the drag event. How do I solve this?
Apart of "mouseMoveEvent", I have "dragEnter" and "drop" event.

Question
By default we have a context menu created for spinWidget, If you create your own context menu, the default one is no more available. Is it possible to add menu actions to the default context menu?

Cheers

Prashant