Programatically generated slot names
Richard Moore
richmoore44 at gmail.com
Thu Jan 29 21:10:38 GMT 2009
On Thu, Jan 29, 2009 at 6:04 PM, Alexander Neundorf <neundorf at kde.org> wrote:
>> singleshot( SLOT( "slotPage" + n.toString() ) )
>
> I haven't done this myself, but I think you need QMetaObject.
Yes, QMetaObject's invokeMethod is what you want here. The SLOT macro
actually tags a value to the end of the token iirc.
http://doc.trolltech.com/4.1/qmetaobject.html#invokeMethod
Cheers
Rich.
More information about the kde-core-devel
mailing list