+
+ QTextTable* table = c.currentTable();
+ if (NULL != table) {
+ int row = table->cellAt(c).row();
+ QTextTableCell cell = table->cellAt(row, 2);
+ QAction* globalComment = menu.addAction("Add global Comment");
+ QAction* localComment = menu.addAction("Add local Comment");
+
+ QObject::connect(globalComment, &QAction::triggered,
+ [=]() { addComment(cell, "Global comment"); });
+ QObject::connect(localComment, &QAction::triggered,
+ [=]() { addComment(cell, "Local comment"); });
+ }
+