qtquick: Port inDisallowedDragView()

This commit is contained in:
Sergio Martins
2022-05-30 19:45:58 +01:00
parent ab9396af61
commit 31d43b6608
6 changed files with 52 additions and 54 deletions

View File

@@ -130,3 +130,14 @@ bool Platform_qtwidgets::usesFallbackMouseGrabber() const
// For QtWidgets we just use QWidget::grabMouse()
return false;
}
bool Platform_qtwidgets::inDisallowedDragView(QPoint globalPos) const
{
QWidget *widget = qApp->widgetAt(globalPos);
if (!widget)
return false;
// User might have a line edit on the toolbar.
// TODO: Not so elegant fix, we should make the user's tabbar implement some virtual method...
return qobject_cast<QAbstractButton *>(widget) || qobject_cast<QLineEdit *>(widget);
}