QmlDesigner: Fix infinite loop on item library resize

If item library width goes to somewhere between 50-100 pixels
(around the width of a single item), QDS gets stuck in infinite loop.
It's unclear what exactly causes this loop, as it seems to be deep
inside QtDeclarative, so worked around it by enforcing 100 pixel
minimum width for item library.

Change-Id: Ib1193cce760098edd0df61177058f134f406101e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2021-03-09 14:13:37 +02:00
parent 857ffe457c
commit 6deac5593c

View File

@@ -138,6 +138,7 @@ ItemLibraryWidget::ItemLibraryWidget(AsynchronousImageCache &imageCache,
ItemLibraryModel::registerQmlTypes();
setWindowTitle(tr("Library", "Title of library view"));
setMinimumWidth(100);
// create header widget
m_headerWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);