Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get mouse position in StartDrag()
Forum Update on Monday, May 27th 2025

Get mouse position in StartDrag()

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 874 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bigbangvn
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Harshi
      wrote on last edited by
      #2

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

      Use event->pos Value in Your Function.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved