Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Call function when select a row [SOLVED]
i have implemented a grid with the QTableView class. I want to call a specific function when i select a row and and when i do multiple selection (with ctrl pressed) i want to call another function. How can i do tis?
check "QTableView::selectionModel()":http://qt-project.org/doc/qt-4.8/qabstractitemview.html#selectionModel and it's signals
i can't find my solution there. To be more specific when i click a header of my table i emmit "QHeaderView::sectionClicked":http://qt-project.org/doc/qt-4.8/qheaderview.html#sectionClicked
I want to know how can i make the programm to undestand when i select another row using crtl so i have multiple selection.
listen to the "selectionChanged signal":http://qt-project.org/doc/qt-4.8/qitemselectionmodel.html#selectionChanged and check selection of rows with "selectedRows":http://qt-project.org/doc/qt-4.8/qitemselectionmodel.html#selectedRows
Is this enough for you?
ok, thanks a lot