use Item width and height as minimumSize

massively not optimal. however qml doesn't have concept of size hints unfortunately
This commit is contained in:
Marco Martin 2011-04-20 20:34:52 +02:00
parent 7f46a77e7d
commit 14d3286096

View File

@ -159,10 +159,11 @@ void DeclarativeWidgetPrivate::finishExecute()
object->setProperty("height", q->size().height());
}
//FIXME: find a better way to have a minimum size
if (width > 0 && height > 0) {
q->setPreferredSize(width, height);
q->setMinimumSize(width, height);
} else {
q->setPreferredSize(-1, -1);
q->setMinimumSize(-1, -1);
}
}
emit q->finished();