mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02: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) {
|
if (obj == this && event->type() == QEvent::ChildAdded) {
|
||||||
QPointer<QWidget> child = qobject_cast<QWidget*>(static_cast<QChildEvent*>(event)->child());
|
QPointer<QWidget> child = qobject_cast<QWidget*>(static_cast<QChildEvent*>(event)->child());
|
||||||
QTimer::singleShot(0, this, [=]() {
|
QTimer::singleShot(0, this, [=]() {
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||||
if (child && child->inherits("QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget")) {
|
if (child && child->inherits("QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget")) {
|
||||||
|
#else
|
||||||
|
if (child) {
|
||||||
|
#endif
|
||||||
m_rwhvqt = child;
|
m_rwhvqt = child;
|
||||||
m_rwhvqt->installEventFilter(this);
|
m_rwhvqt->installEventFilter(this);
|
||||||
if (auto *w = qobject_cast<QQuickWidget*>(m_rwhvqt)) {
|
if (auto *w = qobject_cast<QQuickWidget*>(m_rwhvqt)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user