Alfredo Braunstein wrote:
>> If you can do that in the .ui file, then great. However,
>> QDialogPlus will need to know 'form_' which will be different for
>> each and every Dialog, so you'll need
>> 
>> template <typename Parent>
>> class QDialogPlus : QDialog {
>> QDialogPlus(Parent * form) : form_(form) {}
>> void reject() { form_->slotWMHide(); QDialog::reject(); }
>> Parent * form_;
>> };
>> 
>> I don't think that this is any better/may well be impossible to
>> encode. Have a go.
> 
> Ugh. You convinced me (I understand near to nothing about qt).

Me neither. However, in this case I think that I paint too dark a 
picture. slotWMHide is defined in the QDialogView base class (also in 
the deprecated Qt2Base base class. Not much derives from that anymore 
--- ignore it.). So QDialogPlus neeed not be a template.

If you can get the .ui file to recognise such a base class, then your 
way is clear.

> Alternatively we can also solve it only for the ones that really
> need it.

See my mail to John.

-- 
Angus

Reply via email to