Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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