mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
fix: middle button does not work
This commit is contained in:
parent
dca702e77d
commit
7420944b9d
|
@ -80,8 +80,14 @@ bool ArticleWebView::eventFilter( QObject * obj, QEvent * ev )
|
|||
singleClickAction( pe );
|
||||
} );
|
||||
}
|
||||
if ( pe->buttons() & Qt::MiddleButton )
|
||||
if ( pe->buttons() & Qt::MiddleButton ) {
|
||||
midButtonPressed = true;
|
||||
QTimer::singleShot( 100, this, [ = ]() {
|
||||
sendCustomMouseEvent( QEvent::MouseButtonPress );
|
||||
sendCustomMouseEvent( QEvent::MouseButtonRelease );
|
||||
} );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ( ev->type() == QEvent::MouseButtonRelease ) {
|
||||
auto pe = dynamic_cast< QMouseEvent * >( ev );
|
||||
|
|
Loading…
Reference in a new issue