Replace the deprecated QWheelEvent::delta() -> QWheelEvent::angleDelta()

Replaced the usages of deprecated QWheelEvent::delta() with
QWheelEvent::angleDelta().y(), assuming that it's acceptable to use only the
vertical component of angle delta.

Task-number: QTBUG-76491
Change-Id: I4aa0a5a0e9ba7f33321bdb879b66ffb589b53e42
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sona Kurazyan
2019-08-30 10:12:38 +02:00
parent 8e31932c29
commit 66435024a4
9 changed files with 10 additions and 10 deletions

View File

@@ -83,9 +83,9 @@ QModelIndex TreeViewComboBox::lastIndex(const QModelIndex &index)
void TreeViewComboBox::wheelEvent(QWheelEvent *e)
{
QModelIndex index = m_view->currentIndex();
if (e->delta() > 0)
if (e->angleDelta().y() > 0)
index = indexAbove(index);
else if (e->delta() < 0)
else if (e->angleDelta().y() < 0)
index = indexBelow(index);
e->accept();