
Originally Posted by
Usability
Can anyone tell me where this is done?
Well, it's a bit of a trick : did you notice the boolean parameter in the addPanel() method calls used in window.cpp? They inform QCodeEdit to add the proper actions to the context menu. What's nice though is that you can add actions the exact same way through
QEditor::addAction(QAction*, QString, QString)
To copy to clipboard, switch view to plain text mode
The two string params indicate menu and toolbar labels which are useful only when you use QCodeEdit in combination with qmdilib. To further tune the context menu you can use the two "standard methods" available with ever widgets : reimplementing the contextMenuEvent() method in a subclass or using the customContextMenuRequested signal (after having the context menu policy set properly...).
Bookmarks