VirtualBox

Changeset 101239 in vbox for trunk


Ignore:
Timestamp:
Sep 22, 2023 2:51:16 PM (17 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10513: UIAdvancedSettingsDialog: Adjusting sticky scrolling rules to avoid wheel events being passed to types of widgets which we don't really want these events for.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.cpp

    r101159 r101239  
    480480    }
    481481
     482    /* Unconditionally and for good
     483     * redirect wheel event for widgets of following types to m_pScrollViewport: */
     484    if (   qobject_cast<QAbstractButton*>(pObject)
     485        || qobject_cast<QAbstractSpinBox*>(pObject)
     486        || qobject_cast<QAbstractSpinBox*>(pObject->parent())
     487        || qobject_cast<QComboBox*>(pObject)
     488        || qobject_cast<QSlider*>(pObject)
     489        || qobject_cast<QTabWidget*>(pObject)
     490        || qobject_cast<QTabWidget*>(pObject->parent()))
     491    {
     492        /* Check if redirected event was really handled, otherwise give it back: */
     493        if (QCoreApplication::sendEvent(m_pScrollViewport, pEvent))
     494            return true;
     495    }
     496
    482497    /* While 'sticky scrolling timer' is active
    483498     * redirect wheel event for widgets of following types to m_pScrollViewport: */
    484499    if (   m_pScrollingTimer->isActive()
    485         && (   qobject_cast<QAbstractButton*>(pObject)
    486             || qobject_cast<QAbstractScrollArea*>(pObject)
    487             || qobject_cast<QAbstractScrollArea*>(pObject->parent())
    488             || qobject_cast<QAbstractSpinBox*>(pObject)
    489             || qobject_cast<QAbstractSpinBox*>(pObject->parent())
    490             || qobject_cast<QComboBox*>(pObject)
    491             || qobject_cast<QSlider*>(pObject)
    492             || qobject_cast<QTabWidget*>(pObject)
    493             || qobject_cast<QTabWidget*>(pObject->parent())))
     500        && (   qobject_cast<QAbstractScrollArea*>(pObject)
     501            || qobject_cast<QAbstractScrollArea*>(pObject->parent())))
    494502    {
    495503        /* Check if redirected event was really handled, otherwise give it back: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette