Logo Search packages:      
Sourcecode: qt4-x11 version File versions

bool QObject::inherits ( const char *  className  )  const [inline, inherited]

Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.

A class is considered to inherit itself.

Example:

doc/src/snippets/code/src.corelib.kernel.qobject.cpp 4

( QLayoutItem is not a QObject.)

Consider using qobject_cast<Type *>(object) instead. The method is both faster and safer.

See also:
metaObject(), qobject_cast()

Definition at line 238 of file qobject.h.

Referenced by QFormBuilder::createLayout(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QWindowsXPStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QDesignerFormWindowInterface::findFormWindow(), QApplication::font(), QToolButton::initStyleOption(), QAbstractFormBuilder::layoutInfo(), QApplication::palette(), QWindowsXPStyle::pixelMetric(), QPlastiqueStyle::pixelMetric(), QWindowsStyle::pixelMetric(), QWindowsVistaStyle::polish(), QPlastiqueStyle::polish(), QCleanlooksStyle::polish(), QWindowsXPStyle::polish(), QObject::qt_find_obj_child(), QItemDelegate::setEditorData(), QStyledItemDelegate::setEditorData(), QApplication::setFont(), QGraphicsView::setupViewport(), QCleanlooksStyle::styleHint(), QCommonStyle::subControlRect(), QPlastiqueStyle::unpolish(), QWindowsXPStyle::unpolish(), and QCleanlooksStyle::unpolish().

        { return const_cast<QObject *>(this)->qt_metacast(classname) != 0; }


Generated by  Doxygen 1.6.0   Back to index