Exemplo n.º 1
0
void QmlWebViewWidget::setFocus(bool arg)
{
    QQuickPaintedItem::setFocus(arg);
    if(arg){
        m_widget->setFocus();
        forceActiveFocus();
    }
    else{
        m_widget->clearFocus();
    }
    setActiveFocusOnTab(arg);
}
Exemplo n.º 2
0
QQuickTextField::QQuickTextField(QQuickItem *parent) :
    QQuickTextInput(*(new QQuickTextFieldPrivate), parent)
{
    Q_D(QQuickTextField);
    d->pressAndHoldHelper.control = this;
    d->setImplicitResizeEnabled(false);
    setActiveFocusOnTab(true);
    QObjectPrivate::connect(this, &QQuickTextInput::readOnlyChanged,
                            d, &QQuickTextFieldPrivate::_q_readOnlyChanged);
    QObjectPrivate::connect(this, &QQuickTextInput::echoModeChanged,
                            d, &QQuickTextFieldPrivate::_q_echoModeChanged);
}