mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
fix:single click mouse position
This commit is contained in:
parent
4de296b5a6
commit
93f75d1cf5
|
@ -105,7 +105,7 @@ void ArticleWebView::singleClickAction(QObject* obj, QMouseEvent * event )
|
|||
}
|
||||
|
||||
void ArticleWebView::sendCustomMouseEvent(QObject* obj,QEvent::Type type,QMouseEvent * event){
|
||||
QMouseEvent ev( QEvent::MouseButtonDblClick,event->localPos (),event->windowPos (),event->screenPos (), Qt::LeftButton, Qt::LeftButton, event->modifiers(), Qt::MouseEventSynthesizedByApplication );
|
||||
QMouseEvent ev( QEvent::MouseButtonDblClick,mapFromGlobal(QCursor::pos()),mapFromGlobal(QCursor::pos()),QCursor::pos(), Qt::LeftButton, Qt::LeftButton, event->modifiers(), Qt::MouseEventSynthesizedByApplication );
|
||||
QApplication::sendEvent(obj, &ev );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue