Exemplo n.º 1
0
void QQuickLoaderPrivate::_q_updateSize(bool loaderGeometryChanged)
{
    Q_Q(QQuickLoader);
    if (!item || updatingSize)
        return;

    updatingSize = true;

    if (loaderGeometryChanged && q->widthValid())
        item->setWidth(q->width());
    if (loaderGeometryChanged && q->heightValid())
        item->setHeight(q->height());

    q->setImplicitSize(getImplicitWidth(), getImplicitHeight());

    updatingSize = false;
}
Exemplo n.º 2
0
void QQuickLoaderPrivate::itemImplicitWidthChanged(QQuickItem *)
{
    Q_Q(QQuickLoader);
    q->setImplicitWidth(getImplicitWidth());
}