Skip to content

Instantly share code, notes, and snippets.

@easai
Last active November 8, 2023 16:04
void MainWindow::deleteState(const QPoint &pos) {
QMenu *menu = new QMenu(this);
QAction *ciz = new QAction("&Delete State");
connect(ciz, &QAction::triggered, this, &MainWindow::deleteStateItem);
menu->addAction(ciz);
menu->popup(ui->tableWidget->viewport()->mapToGlobal(pos));
int row = ui->tableWidget->itemAt(pos)->row();
m_currentState = ui->tableWidget->item(row, 0)->text().toInt();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment