PDA

View Full Version : after subclassing will the inbuild signals work



babu198649
26th November 2007, 14:04
hi
i have subclassed the qlistview class to receive mouse double click event .
after this the inbuild signal for double click(doubleClicked(QModelIndex) has no effed.

i have even tried ignoring(event-.ignore) the event inside the mouse doubleclick
event function(which is subclassed)

so if a function is subclassed does the inbuild signals stop functioning.

high_flyer
26th November 2007, 14:18
if you want only to extend functionality available in the base class, you can add in your subclass implementation the base class version call:


void DerivedClass::methodName()
{
BaseClass::methodName(); //base class functionality
// your own extended functionality code
}

wysota
26th November 2007, 15:10
To be precise - you have to add it.