Beispiel #1
0
void QBasicDrag::startDrag()
{
    QPoint pos;
#ifndef QT_NO_CURSOR
    pos = QCursor::pos();
    if (pos.x() == int(qInf())) {
        // ### fixme: no mouse pos registered. Get pos from touch...
        pos = QPoint();
    }
#endif
    recreateShapedPixmapWindow(Q_NULLPTR, pos);
    enableEventFilter();
}
Beispiel #2
0
void QBasicDrag::startDrag()
{
    // ### TODO Check if its really necessary to have m_drag_icon_window
    // when QDrag is used without a pixmap - QDrag::setPixmap()
    if (!m_drag_icon_window)
        m_drag_icon_window = new QShapedPixmapWindow();

    m_drag_icon_window->setPixmap(m_drag->pixmap());
    m_drag_icon_window->setHotspot(m_drag->hotSpot());
    m_drag_icon_window->updateGeometry();
    m_drag_icon_window->setVisible(true);

    enableEventFilter();
}
Beispiel #3
0
void QBasicDrag::startDrag()
{
    // ### TODO Check if its really necessary to have m_drag_icon_window
    // when QDrag is used without a pixmap - QDrag::setPixmap()
    if (!m_drag_icon_window)
        m_drag_icon_window = new QShapedPixmapWindow();

    m_drag_icon_window->setPixmap(m_drag->pixmap());
    m_drag_icon_window->setHotspot(m_drag->hotSpot());

#ifndef QT_NO_CURSOR
    QPoint pos = QCursor::pos();
    if (pos.x() == int(qInf())) {
        // ### fixme: no mouse pos registered. Get pos from touch...
        pos = QPoint();
    }
    m_drag_icon_window->updateGeometry(pos);
#endif

    m_drag_icon_window->setVisible(true);

    enableEventFilter();
}