mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 04:36:34 +01:00
Fix mouse events with Qt 6.
This commit is contained in:
parent
777789f509
commit
306d4addd0
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user