C++ (Qt)void Widget::customMenuRequested(QPoint pos){ QModelIndex index=table->indexAt(pos); QMenu *menu=new QMenu(this); menu->addAction(new QAction("Action 1", this)); menu->addAction(new QAction("Action 2", this)); menu->addAction(new QAction("Action 3", this)); menu->popup(table->viewport()->mapToGlobal(pos));
C++ (Qt)QModelIndex index=table->indexAt(pos);
C++ (Qt) int row = view->indexAt(pos).row(); int col = view->indexAt(pos).column();qDebug() << view->model()->index(row,col).data().toString();
C++ (Qt)table->indexAt(pos).data().toString()
C++ (Qt)QModelIndex QItemSelectionModel::currentIndex() const