All pastes #2049356 Raw Edit

Unnamed

public text v1 · immutable
#2049356 ·published 2011-04-22 12:29 UTC
rendered paste body
void InputLayout::createTabOrder(uint index)
{
    QWidget *widget = widgetAt(index);
    QWidget *preceding = (index == 0 ? m_preceding : widgetAt(index - 1));
    QWidget *following = (static_cast<int>(index + 1) == count() ? m_following : widgetAt(index + 1));

    if (widget && preceding && following) {
        QWidget::setTabOrder(preceding, widget);
        QWidget::setTabOrder(widget, following);
    }
}