QAccessible::Relation QAccessibleGroupBox::relationTo(int child, const QAccessibleInterface* other, int otherChild) const { QGroupBox *groupbox = this->groupBox(); QAccessible::Relation relation = QAccessibleWidgetEx::relationTo(child, other, otherChild); if (!child && !otherChild && !groupbox->title().isEmpty()) { QObject *o = other->object(); if (groupbox->children().contains(o)) relation |= Label; } return relation; }
/*! \reimp */ QAccessible::Relation QAccessibleDisplay::relationTo(int child, const QAccessibleInterface *other, int otherChild) const { Relation relation = QAccessibleWidgetEx::relationTo(child, other, otherChild); if (child || otherChild) return relation; QObject *o = other->object(); QLabel *label = qobject_cast<QLabel*>(object()); if (label) { #ifndef QT_NO_SHORTCUT if (o == label->buddy()) relation |= Label; #endif #ifndef QT_NO_GROUPBOX } else { QGroupBox *groupbox = qobject_cast<QGroupBox*>(object()); if (groupbox && !groupbox->title().isEmpty()) if (groupbox->children().contains(o)) relation |= Label; #endif } return relation; }