diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx index 8e26055cf1f9..34bf6dee0c13 100644 --- a/vcl/qt5/QtInstanceTreeView.cxx +++ b/vcl/qt5/QtInstanceTreeView.cxx @@ -236,7 +236,7 @@ std::vector QtInstanceTreeView::get_selected_rows() const std::vector aSelectedRows; GetQtInstance().RunInMainThread([&] { - const QModelIndexList aSelectionIndexes = m_pSelectionModel->selection().indexes(); + const QModelIndexList aSelectionIndexes = m_pSelectionModel->selectedRows(); for (const QModelIndex& aIndex : aSelectionIndexes) aSelectedRows.push_back(aIndex.row()); });