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
Forum Updated to NodeBB v4.3 + New Features

In QDrag not work setDragCursor on Windows

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 261 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