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

void QAbstractFormBuilder::applyTabStops ( QWidget widget,
DomTabStops *  tabStops 
) [protected, virtual, inherited]

For internal use only.

Definition at line 1577 of file abstractformbuilder.cpp.

References QList< T >::at(), QByteArray::data(), QWidget::setTabOrder(), QList< T >::size(), and QString::toUtf8().

Referenced by QAbstractFormBuilder::create().

{
    if (!tabStops)
        return;

    QWidget *lastWidget = 0;

    QStringList l = tabStops->elementTabStop();
    for (int i=0; i<l.size(); ++i) {
        QString name = l.at(i);

        QWidget *child = qFindChild<QWidget*>(widget, name);
        if (!child) {
            qWarning("'%s' isn't a valid widget\n", name.toUtf8().data());
            continue;
        }

        if (i == 0) {
            lastWidget = qFindChild<QWidget*>(widget, name);
            continue;
        } else if (!child || !lastWidget) {
            continue;
        }

        QWidget::setTabOrder(lastWidget, child);

        lastWidget = qFindChild<QWidget*>(widget, name);
    }
}


Generated by  Doxygen 1.6.0   Back to index