<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Consolas'; font-size:11pt; font-weight:400; font-style:normal;">On Sunday 13 July 2008, Rafael Fernández López wrote:<br>
> Hi,<br>
><br>
> > Btw KAbstractFileWidget does not inherit QObject so i can't make it<br>
> > emitting signals. Can i make another class in the same files which emits<br>
> > the signal when called from KAbstractFileWidget? Or there is something<br>
> > prettier to do this?<br>
><br>
> OK, I didn't notice this. You are right.<br>
><br>
> Does this method needs to be virtual (as before said by others) ? If<br>
> not, just add the implementation on KAbstractFileWidget too.<br>
><br>
> In the case it needs to be virtual, I guess you can do a workaround.<br>
> We can forget the signal/slot thing for now. I would suggest adding a<br>
> protected d pointer on KAbstractFileWidget, something like:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>Doesn't KAbstractFileWidget already have a virtual_hook() virtual function which you can use? My understanding was that this was the intent of virtual_hook().<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>You could then have a non-virtual function in KAbstractFileWidget whose implementation packages up the parameters for virtual_hook() and then calls virtual_hook(). Subclasses would then have to reimplement virtual_hook() if they needed to change the behavior though so it may not be the best way I guess if there's an easier way.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>Regards,<br>
- Michael Pyne</p></body></html>