5void MyTextEdit::contextMenuEvent(QContextMenuEvent *event)
7 QMenu *menu = createStandardContextMenu();
8 menu->addAction(tr(
"My Menu Item"));
10 menu->exec(event->globalPos());
17edit->textCursor().insertText(text);
22edit->textCursor().insertHtml(fragment);