PDA

View Full Version : Q3TextEdit custom context menu



bcteh_98
15th February 2006, 09:55
Hi,

How to implement custom context menu for Q3TextEdit ?

I use the below code, but the signal is not emited.
It still display the default menu.

Q3TextEdit *messageEditor= new Q3TextEdit(topSplitter);
messageEditor->setContextMenuPolicy(Qt::CustomContextMenu);
connect(messageEditor,SIGNAL(customContextMenuRequ ested ( const QPoint &)),
this,SLOT(slotEditorMenuRequested(const QPoint &)));

Regards
Teh

axeljaeger
15th February 2006, 22:00
You can try an event filter and filter out the QContextMenu event, then show your own menu.