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. In QDrag not work setDragCursor on Windows
Qt 6.11 is out! See what's new in the release blog

In QDrag not work setDragCursor on Windows

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 301 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Mikeeeeee
    wrote on last edited by
    #1

    Hi!
    In QDrag not work setDragCursor on Windows, but wirk on Ubuntu. The cursor remains unchanged.
    How can I fix this?

            pixmap = QPixmap(imagePath)
            sizeImage = 15
            pixmap2 = pixmap.scaled(sizeImage, sizeImage)
    
            drag.setDragCursor(pixmap2, QtCore.Qt.MoveAction)
            drag.setDragCursor(pixmap2, QtCore.Qt.IgnoreAction)
    
            dropAction = drag.exec()
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on last edited by
      #2

      From the documentation:
      "Note: setting the drag cursor for IgnoreAction may not work on all platforms. X11 and macOS has been tested to work. Windows does not support it."

      1 Reply Last reply
      2

      • Login

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