diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp index e3645756d69..584f60c4082 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp @@ -207,9 +207,12 @@ ItemLibraryAssetImportDialog::ItemLibraryAssetImportDialog( ++optIndex; } - m_simpleData.contentWidgets.resize(optIndex); - m_advancedData.contentWidgets.resize(optIndex); - m_labelToControlWidgetMaps.resize(optIndex); + // Resize lists in loop for Qt5 compatibility + for (int i = 0; i < optIndex; ++i) { + m_simpleData.contentWidgets.append({}); + m_advancedData.contentWidgets.append({}); + m_labelToControlWidgetMaps.append(QHash()); + } // Create tab for each supported extension group that also has files included in the import QMap tabMap; // QMap used for alphabetical order