[Qt-interest] how to know derive class

Ivan Kharin korsar.akvis at gmail.com
Thu Nov 11 08:57:02 CET 2010


> Now, snippets: convert QWidget to QLineEdit, if failed, then it’s a QComboBox.
> But I think this is not good.

don't use C-cast. use qobject_cast<WidgetType*>() instead.

-- 
Regards,
Ivan Kharin





More information about the Qt-interest-old mailing list