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

bool QWidget::isVisibleTo ( QWidget ancestor  )  const [inherited]

Returns true if this widget would become visible if ancestor is shown; otherwise returns false.

The true case occurs if neither the widget itself nor any parent up to but excluding ancestor has been explicitly hidden.

This function will still return true if the widget is obscured by other windows on the screen, but could be physically visible if it or they were to be moved.

isVisibleTo(0) is identical to isVisible().

See also:
show() hide() isVisible()

Definition at line 6632 of file qwidget.cpp.

References QWidget::isHidden(), QWidget::isWindow(), and QWidget::parentWidget().

Referenced by Q3ScrollView::focusNextPrevChild(), and Q3WidgetStack::raiseWidget().

    if (!ancestor)
        return isVisible();
    const QWidget * w = this;
    while (w
            && !w->isHidden()
            && !w->isWindow()
            && w->parentWidget()
            && w->parentWidget() != ancestor)
        w = w->parentWidget();
    return !w->isHidden();

Generated by  Doxygen 1.6.0   Back to index