Qt 4.8
Functions
qtreeview.cpp File Reference
#include "qtreeview.h"
#include <qheaderview.h>
#include <qitemdelegate.h>
#include <qapplication.h>
#include <qscrollbar.h>
#include <qpainter.h>
#include <qstack.h>
#include <qstyle.h>
#include <qstyleoption.h>
#include <qevent.h>
#include <qpen.h>
#include <qdebug.h>
#include <qaccessible.h>
#include <qaccessible2.h>
#include <private/qtreeview_p.h>
#include "moc_qtreeview.cpp"

Go to the source code of this file.

Functions

static bool ancestorOf (QObject *widget, QObject *other)
 

move to QObject :)

More...
 

Function Documentation

◆ ancestorOf()

static bool ancestorOf ( QObject widget,
QObject other 
)
inlinestatic

move to QObject :)

Definition at line 1523 of file qtreeview.cpp.

Referenced by QTreeView::drawRow().

1524 {
1525  for (QObject *parent = other; parent != 0; parent = parent->parent()) {
1526  if (parent == widget)
1527  return true;
1528  }
1529  return false;
1530 }
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273