Berryblue031
14th March 2012, 15:47
I am attempting to override the copy() slot on QTextBrowser (so that it will only copy/paste plain text instead of text with html formatting).
According to this document (http://qt-project.org/faq/answer/is_it_possible_to_reimplement_non-virtual_slots) it should not be necessary for the slot to be virtual because it is not connected through the constructor. As I understand it from looking at the source the context menu is regenerated every time there is a context menu event i.e. you right click on the QTextBrowser.
However it is not working - the copy slot I declare in my subclass of QTextBrowser is not called when clicking the "copy" item in the context menu.
Does anybody have experience with this?
According to this document (http://qt-project.org/faq/answer/is_it_possible_to_reimplement_non-virtual_slots) it should not be necessary for the slot to be virtual because it is not connected through the constructor. As I understand it from looking at the source the context menu is regenerated every time there is a context menu event i.e. you right click on the QTextBrowser.
However it is not working - the copy slot I declare in my subclass of QTextBrowser is not called when clicking the "copy" item in the context menu.
Does anybody have experience with this?