VirtualBox

Changeset 86832 in vbox


Ignore:
Timestamp:
Nov 9, 2020 9:03:35 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9831. Setting widget cursor as the find widget is dragged

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp

    r86831 r86832  
    308308    if (pObject == m_pDragMoveLabel)
    309309    {
    310         if (pEvent->type() == QEvent::MouseMove)
     310        if (pEvent->type() == QEvent::Enter)
     311            m_pDragMoveLabel->setCursor(Qt::CrossCursor);
     312        else if (pEvent->type() == QEvent::Leave)
     313        {
     314            if (parentWidget())
     315                m_pDragMoveLabel->setCursor(parentWidget()->cursor());
     316        }
     317        else if (pEvent->type() == QEvent::MouseMove)
    311318        {
    312319            QMouseEvent *pMouseEvent = static_cast<QMouseEvent*>(pEvent);
     
    316323                    emit sigDragging(pMouseEvent->globalPos() - m_previousMousePosition);
    317324                m_previousMousePosition = pMouseEvent->globalPos();
     325                m_pDragMoveLabel->setCursor(Qt::ClosedHandCursor);
    318326            }
    319327        }
    320328        else if (pEvent->type() == QEvent::MouseButtonRelease)
     329        {
    321330            m_previousMousePosition = QPoint(-1, -1);
     331            m_pDragMoveLabel->setCursor(Qt::CrossCursor);
     332        }
    322333    }
    323334    return QIWithRetranslateUI<QWidget>::eventFilter(pObject, pEvent);
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