How do I fire a MouseMove Event from inside a slot?? Meaning
void slotOnPasteButton(){
if( ! computePasteRect() ){ //Gives the reactangular area for object to be pasted
return;
}
// fire or call MouseMove Event
// If the <esc> key is pressed, cancel the pasting operation which I need to check like this
if ( e
->type
() == QEvent::KeyPress && ((QKeyEvent *)e
)->key
() == Qt
::Key_Escape ) { //user cancelled paste operation
//clear pasteRect
}
// We have now returned from the mouseMoveEvent, with a new position for the
// bounding box of the objects to be pasted
if( !pasteRect.isNull() )
//do stuffs to paste the object at new position
}
void slotOnPasteButton(){
if( ! computePasteRect() ){ //Gives the reactangular area for object to be pasted
return;
}
// fire or call MouseMove Event
// If the <esc> key is pressed, cancel the pasting operation which I need to check like this
if ( e->type() == QEvent::KeyPress && ((QKeyEvent *)e)->key() == Qt::Key_Escape ) {
//user cancelled paste operation
//clear pasteRect
}
// We have now returned from the mouseMoveEvent, with a new position for the
// bounding box of the objects to be pasted
if( !pasteRect.isNull() )
//do stuffs to paste the object at new position
}
To copy to clipboard, switch view to plain text mode
Bookmarks