예제 #1
0
/*!
    \qmlproperty bool TextEdit::wrap

    Set this property to wrap the text to the TextEdit item's width.
    The text will only wrap if an explicit width has been set.

    Wrapping is done on word boundaries (i.e. it is a "word-wrap"). Wrapping is off by default.
*/
void QDeclarativeTextEdit::setWrap(bool w)
{
    Q_D(QDeclarativeTextEdit);
    if (w == d->wrap)
        return;
    d->wrap = w;
    d->updateDefaultTextOption();
    updateSize();
    emit wrapChanged(d->wrap);
}
예제 #2
0
void QDeclarativeText::setWrap(bool w)
{
    Q_D(QDeclarativeText);
    if (w == d->wrap)
        return;

    d->wrap = w;

    d->updateLayout();
    d->markImgDirty();
    emit wrapChanged(d->wrap);
}