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. How do you use ScrollHandDrag without the "hand" cursor?
Forum Updated to NodeBB v4.3 + New Features

How do you use ScrollHandDrag without the "hand" cursor?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 342 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.
  • enjoysmathE Offline
    enjoysmathE Offline
    enjoysmath
    wrote on last edited by
    #1

    The hand cursor is too fat and is blocking a control point when you go to press it. I'd like to see the arrow at that point.

    def set_select_mode(self, en):
        if en:
            self.setDragMode(self.RubberBandDrag)
        else:
            self.setCursor(QCursor(Qt.ArrowCursor))
            self.setDragMode(self.ScrollHandDrag) 
    

    Doesn't work, it still has the hand cursor.

    https://github.com/enjoysmath
    https://math.stackexchange.com/users/26327/exercisingmathematician

    1 Reply Last reply
    0
    • enjoysmathE Offline
      enjoysmathE Offline
      enjoysmath
      wrote on last edited by
      #2

      Figured it out.

      def hoverEnterEvent(self, event):
          self.update_connector_shape(event.pos())
          self.setCursor(QCursor(Qt.ArrowCursor))
          super().hoverEnterEvent(event)
      

      You set the cursor in the hover event of the item containing the control points. Then it changes to arrow and goes back to hand upon hover leaving, on its own.

      https://github.com/enjoysmath
      https://math.stackexchange.com/users/26327/exercisingmathematician

      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