Results 1 to 9 of 9

Thread: Change cursor when pointer moving through QTableView's header

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2012
    Posts
    53
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Change cursor when pointer moving through QTableView's header

    Sorry I think I used the wrong reply button.
    Just to repeat what I typed before,
    I see event cannot help me in this case, but is there a way to restore the cursor when the pointer moves to the header area?
    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Change cursor when pointer moving through QTableView's header

    If the pointer moves on the header, the header will get an enterEvent. If you intercept such event, you can react on it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2012
    Posts
    53
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Change cursor when pointer moving through QTableView's header

    I think enterEvent should work, but before that I've tried the signal entered like

    Qt Code:
    1. m_view->horizontalHeader()->setMouseTracking(true);
    2. connect(m_view->horizontalHeader(), SIGNAL(entered(QModelIndex)), this, SLOT(changeCursor(QModelIndex)));
    To copy to clipboard, switch view to plain text mode 

    And it does not work at all.
    I saw the link http://www.qtcentre.org/threads/4405...t-quot-signals
    which says it's a bug.

    Anyway thanks a lot for your help.

Similar Threads

  1. Change cursor inside QTableview
    By big4mil in forum Qt Programming
    Replies: 4
    Last Post: 15th November 2010, 11:04
  2. Cursor is not moving through QTreeWidgetItem list in QTreeWidget
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 0
    Last Post: 11th December 2009, 06:52
  3. Moving cursor in QPlainTextEdit
    By pgbackup in forum Qt Programming
    Replies: 2
    Last Post: 11th September 2009, 19:26
  4. [HELP] Display Mouse pointer/cursor ??
    By haconganh in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 21st May 2007, 09:09
  5. Moving Tooltip out of cursor-area
    By afo in forum KDE Forum
    Replies: 1
    Last Post: 7th January 2006, 15:13

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.