PDA

View Full Version : QTableView mouse pointer show/hide issue with tableview scrollbar



dpatel
8th February 2012, 11:20
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

Spitfire
13th February 2012, 15:54
To achieve what you want all you need is single line of code:

table->viewport()->setCursor( Qt::BlankCursor );