MCPcopy Create free account
hub / github.com/KDAB/KDChart / itemClicked

Method itemClicked

examples/ModelView/TableView/mainwindow.cpp:118–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void MainWindow::itemClicked(const QModelIndex &index)
119{
120 QItemSelectionModel::SelectionFlags command = QItemSelectionModel::Clear | QItemSelectionModel::Select;
121 if (QApplication::keyboardModifiers() & Qt::ControlModifier)
122 command = QItemSelectionModel::Toggle;
123 m_selectionModel->setCurrentIndex(static_cast<const QAbstractProxyModel *>(index.model())
124 ->mapToSource(index),
125 command);
126}
127
128void MainWindow::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
129{

Callers

nothing calls this directly

Calls 2

mapToSourceMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected