[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Help with KDialogButtonBox
From: Michael Pyne <mpyne () kde ! org>
Date: 2010-12-23 23:10:58
Message-ID: 201012231811.04248.mpyne () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Thursday, December 23, 2010 18:02:36 Steven Sroka wrote:
> I need some help with a KDE program I'm trying to write.
> I have my main function calling a custom class, KReminder(), which is
> sub-classed from KDialogButtonBox. Within the KReminder() I have:
>
> KPushButton *nextButton = addButton(nextGuiItem, AcceptRole, this,
> SLOT(next()));
>
> 'this' refers to KReminder(). The 'addButton' function expects the
> third argument to be a QObject* and not a KReminder* const, so I'm
> getting an error. I've tried the KDE forums, but I haven't found a fix
> for this.
Whatever KReminder member function you're in is declared to be const. That
changes the type of this from KReminder* to KReminder *const.
Either make that member function non-const, or don't do things which can
mutate that object (addButton needs to update structures within the QObject
you're subclassing so there's no way it's a const method).
Regards,
- Michael Pyne
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic