Get mouse position in StartDrag()



  • Hi,
    I use QListWidget and drag it's QListWidgetItem. In StartDrag() event, i want to get mouse-position. Does anyone know how to do that?

    @void VideoSegmentList::startDrag(Qt::DropActions /supportedActions/)
    {
    //How to get mouse postion in here!
    }@

    Thanks.



  • void MainWindow::mouseMoveEvent(QMouseEvent *event){
    qDebug() << event->pos();
    }

    Use event->pos Value in Your Function.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.