[Qt-interest] how I can know the widget is editable?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Fri Mar 20 16:08:41 CET 2009
Shabd Swarup V wrote on Friday, March 20, 2009 9:53 AM:
> You would probably need to type cast (using qobject_cast) to each
> widget kind which CAN be editable and check.
Or you could use http://doc.trolltech.com/4.5/qmetaobject.html#className which returns the class name as const char *, and then do a quick lookup in a list (better yet: a QMap or something :) of "well known editable widgets". Might be slightly more performant than qobject_casting to all possible widgets.
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list