QPoint pos = widget->mapFromGlobal(QCursor::pos());QMouseEvent *event = new QMouseEvent(QEvent::MouseMove, pos, Qt::NoButton, Qt::NoButton, Qt::NoModifier); QCoreApplication::postEvent(widget, event);