diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx index 10fb36413f6f..8e26055cf1f9 100644 --- a/vcl/qt5/QtInstanceTreeView.cxx +++ b/vcl/qt5/QtInstanceTreeView.cxx @@ -301,7 +301,7 @@ OUString QtInstanceTreeView::get_id(int nPos) const OUString sId; GetQtInstance().RunInMainThread([&] { - QVariant aRoleData = m_pModel->data(m_pModel->index(0, nPos), ROLE_ID); + QVariant aRoleData = m_pModel->data(m_pModel->index(nPos, 0), ROLE_ID); if (aRoleData.canConvert()) sId = toOUString(aRoleData.toString()); });