Important: Please read the 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!


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

    Use event->pos Value in Your Function.

Log in to reply