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. Hand cursor vs arrow pointer in QGraphicsView
Forum Updated to NodeBB v4.3 + New Features

Hand cursor vs arrow pointer in QGraphicsView

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.1k Views 2 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.
  • S Offline
    S Offline
    StringTheory
    wrote on last edited by
    #1

    After setting "setDragMode(QGraphicsView::ScrollHandDrag)", the cursor is set permanently to a hand while over the graphicsview. I thought that the correct mode was to turn the cursor to a hand only when the left mouse button is pressed. I'd prefer the latter mode of operation, if possible. Is there any way to correct this?

    raven-worxR 1 Reply Last reply
    0
    • S StringTheory

      After setting "setDragMode(QGraphicsView::ScrollHandDrag)", the cursor is set permanently to a hand while over the graphicsview. I thought that the correct mode was to turn the cursor to a hand only when the left mouse button is pressed. I'd prefer the latter mode of operation, if possible. Is there any way to correct this?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @StringTheory said in Hand cursor vs arrow pointer in QGraphicsView:

      I thought that the correct mode was to turn the cursor to a hand only when the left mouse button is pressed.

      it's clearer for the user to show the possibility to drag by mouse before he starts dragging. That's the reason i guess.

      But if you want you can implement the scrolling yourself. Shouldn't be that hard.
      Just handle the mouse press/move/release events and use QGraphicsView::scrollContentsBy() and scroll by the delta of the position of last mouse-move event.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      3
      • S Offline
        S Offline
        StringTheory
        wrote on last edited by
        #3

        Ah, so it's normal operation. I wasn't sure if I had caused it. I don't remember seeing any other program operate in this fashion, but I understand the reasoning.

        I've been considering handling mouse/cursor ops, but I was hoping to put that off til later. As a quick fix, maybe I could set ScrollHandDrag only when the mouse button is down. Not sure if that would work though.

        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