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. QTreeView or QHeaderView resize cursor
Forum Updated to NodeBB v4.3 + New Features

QTreeView or QHeaderView resize cursor

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 3.4k 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.
  • D Offline
    D Offline
    ddolby
    wrote on last edited by
    #1

    I have a class that inherits from QTreeView, I would like the mouse cursor to change to the Qt::SizeHorCursor cursor when the mouse is over the column boundary of the QHeaderView columns. This doesn't seem to be built into QHeaderView or QTreeView automatically. I have enabled mouse tracking of both the QTreeView and the QHeaderView but I do not get the mouseMove events unless the left mouse button is pressed which doesn't help me to implement my own routine to change the cursor.

    Has anyone already solved this that can share code samples?

    Thanks
    ddolby

    1 Reply Last reply
    0
    • _ Offline
      _ Offline
      _rmn
      wrote on last edited by
      #2

      What Qt version do you use?
      Do you set resize mode of header view (http://qt-project.org/doc/qt-4.8/qheaderview.html#ResizeMode-enum) to interactive?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        ddolby
        wrote on last edited by
        #3

        I am running Qt 4.8.3 and the resize mode is interactive.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AlekseyOk
          wrote on last edited by
          #4

          Hi, try to add
          @
          setMouseTracking(true);
          @

          to your view class

          1 Reply Last reply
          0
          • D Offline
            D Offline
            ddolby
            wrote on last edited by
            #5

            as I indicated in my original post. I have enabled mouse tracking.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MarioQt
              wrote on last edited by
              #6

              Hi @ddolby
              We do have the same problem, interestingly seems that this problem is new on our application (like it came with a Qt upgrade). Did you found a solution?

              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