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

src_gui_widgets_qplaintextedit.cpp

//! [0]
void MyQPlainTextEdit::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]

Generated by  Doxygen 1.6.0   Back to index