1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Fix mouse events with Qt 6.

This commit is contained in:
Tiernan Hubble 2023-04-23 15:07:33 -06:00 committed by Juraj Oravec
parent 777789f509
commit 306d4addd0
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -1288,7 +1288,11 @@ bool WebView::eventFilter(QObject *obj, QEvent *event)
if (obj == this && event->type() == QEvent::ChildAdded) {
QPointer<QWidget> child = qobject_cast<QWidget*>(static_cast<QChildEvent*>(event)->child());
QTimer::singleShot(0, this, [=]() {
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
if (child && child->inherits("QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget")) {
#else
if (child) {
#endif
m_rwhvqt = child;
m_rwhvqt->installEventFilter(this);
if (auto *w = qobject_cast<QQuickWidget*>(m_rwhvqt)) {