Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

src_gui_widgets_qtextedit.cpp

//! [0]
void MyTextEdit::contextMenuEvent(QContextMenuEvent *event)
{
    QMenu *menu = createStandardContextMenu();
    menu->addAction(tr("My Menu Item"));
    //...
    menu->exec(event->globalPos());
    delete menu;
}
//! [0]


//! [1]
edit->textCursor().insertText(text);
//! [1]


//! [2]
edit->textCursor().insertHtml(fragment);
//! [2]

Generated by  Doxygen 1.6.0   Back to index