[QTable] Disable centering of rows on mouseclick
Hello :)
I have a question for you, i'm sitting here with a little bit weird problem.
Let me explain...
I have a QTable, what happens now is... if I have row 1 (see screenshot) just half visible on the screen, it will update itself (scroll to the start of row 1) on a click on a cell in that row... So the whole row 1 becomes visible.
All I want to do is disabling this "feature", so if I click on a cell in that row, the scrollbars must stay in place and not move .....
It's really boggling my mind :confused:
Does anybody know what i mean? or could help me solving the struggle? :D
http://img104.imageshack.us/img104/4...rowsmt3.th.jpg
Re: [QTable] Disable centering of rows on mouseclick
Does it get centered, if you select that row programmatically?
Re: [QTable] Disable centering of rows on mouseclick
Quote:
Originally Posted by
jacek
Does it get centered, if you select that row programmatically?
You mean by calling the function QTable::selectRow(int row) ?
I will try tomorrow @ work...
This is just a sample screenshot.. For the application i need this I created already a subclass from QTable and reimplemented the selectRow(int row) function and left it empty.. but also then it centers on a mouseclick. :(
Re: [QTable] Disable centering of rows on mouseclick
Quote:
Originally Posted by
BrainB0ne
but also then it centers on a mouseclick
My idea is to intercept mouse click with event filter and invoke selectRow() instead.
Re: [QTable] Disable centering of rows on mouseclick
Quote:
Originally Posted by
jacek
My idea is to intercept mouse click with event filter and invoke selectRow() instead.
Great! I solved it thanx to you...
I reimplemented the viewportMousePressEvent( QMouseEvent *e ) function at my table subclass.. and catched the mouse event, from there i call the functions i need :)