summaryrefslogtreecommitdiff
path: root/src/controls/TableView.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-05-21 11:26:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-22 10:42:09 +0200
commit7366ee95f47beec0c717af8c5bcbcd3a9953bd19 (patch)
treec6061d409b875a9891816971d090a724e939dc23 /src/controls/TableView.qml
parent47a8b89bcc3b447bea7931feff27517a6b9337c4 (diff)
downloadqtquickcontrols-7366ee95f47beec0c717af8c5bcbcd3a9953bd19.tar.gz
TableView: Fix rowAt function
Task-number: QTBUG-31160 Change-Id: Ife5837645636be1b2b2ee5cf9b0aa27ac04c2dc0 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/TableView.qml')
-rw-r--r--src/controls/TableView.qml5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml
index 46e1d97d..7d85bda4 100644
--- a/src/controls/TableView.qml
+++ b/src/controls/TableView.qml
@@ -274,9 +274,8 @@ ScrollView {
*/
function rowAt(x, y) {
- if (headerVisible)
- y -= headerrow.height
- return listView.indexAt(x, y)
+ var obj = root.mapToItem(listView.contentItem, x, y)
+ return listView.indexAt(obj.x, obj.y)
}