Results 1 to 2 of 2

Thread: QTableView mouse pointer show/hide issue with tableview scrollbar

  1. #1
    Join Date
    Feb 2010
    Posts
    99
    Thanks
    31
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QTableView mouse pointer show/hide issue with tableview scrollbar

    Hi,
    I am using QTableView and I want to hide mouse pointer on table cells and mouse pointer should be visible on header and scrollbar,and for that I am using mouseEnter and mouseLeave event and mouse movement to show/ hide mouse pointer but the problem is while moving mouse pointer from table data cells to outside the table, when mouse pointer reaches on scrollbar it is not visible as I am not getting mouseLeave event on table while mouse pointer is on scrollbar and also that time no mouse move event in QTableView.

    Can anyone please help to achieve mouse pointer hiding on table cells only and should be visible on header and on scrollbar.?

    Thanks

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTableView mouse pointer show/hide issue with tableview scrollbar

    To achieve what you want all you need is single line of code:
    Qt Code:
    1. table->viewport()->setCursor( Qt::BlankCursor );
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to Spitfire for this useful post:

    Seishin (30th July 2012)

Similar Threads

  1. QLabel and Mouse pointer Issue
    By newb in forum Qt Programming
    Replies: 3
    Last Post: 24th July 2010, 12:31
  2. Replies: 3
    Last Post: 12th July 2010, 14:12
  3. Is it possible to hide mouse pointer??
    By webquinty in forum Newbie
    Replies: 5
    Last Post: 24th November 2009, 15:57
  4. How can I hide the mouse pointer?
    By dimaz in forum Qt Programming
    Replies: 2
    Last Post: 22nd August 2008, 20:08
  5. QTableView number of rows and scrollbar issue
    By jnk5y in forum Qt Programming
    Replies: 3
    Last Post: 1st March 2006, 07:55

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.