Add some function to reimplement method
Hi
I want add:
Code:
if( !anchorAt( e->pos() ).isEmpty() )
to orginal(default, not edited) method "mouseDoubleClickEvent" in qtextedit.
If i make my own method
Code:
{
if( !anchorAt( e->pos() ).isEmpty() )
}
then default(if you double click on char then selected all word) will be not work
So if i want add(not edit) then i will be have to make somting like this
Code:
{
//i have to finde default code mouseDoubleClickEventand and past here
if( !anchorAt( e->pos() ).isEmpty() )
}
Somebody know faster way to do this , without copy code from default method ??
Re: Add some function to reimplement method
<facepalm/> Call the base class implementation... This is basic C++...
Re: Add some function to reimplement method
then i will by have to make new method xx()
Code:
{
mouseDoubleClickEvent(e)
if( !anchorAt( e->pos() ).isEmpty() )
}
but now how tu set methos xx() to make on doubleclick
in constructor
connect(mouse, Signal (double click), this , slot(xx())) ???
Re: Add some function to reimplement method
No, you will not have to make a new method.
Code:
void MyTextEdit
::mouseDoubleClickEvent(QMouseEvent *e
) { }
Re: Add some function to reimplement method