コード例 #1
0
void PasswordFieldBackend::setPlaceholderText(const QString& value)
{
    if (m_placeholderText != value)
    {
        m_placeholderText = value;
        emit placeholderTextChanged();
    }
}
コード例 #2
0
void QQuickTextField::setPlaceholderText(const QString &text)
{
    Q_D(QQuickTextField);
    if (d->placeholder != text) {
        d->placeholder = text;
#ifndef QT_NO_ACCESSIBILITY
        if (d->accessibleAttached)
            d->accessibleAttached->setDescription(text);
#endif
        emit placeholderTextChanged();
    }
}
コード例 #3
0
void PasswordFieldBackend::endFieldUpdate()
{
    EditFieldBackendBase::endFieldUpdate();

    if (m_value.isCurrentValueDifferentFromStoredValue())
    {
        emit valueChanged();
    }

    if (m_placeholderText.isCurrentValueDifferentFromStoredValue())
    {
        emit placeholderTextChanged();
    }
}