Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
Qt Creator 4.6.1
-
None
Description
The qt quick emulation layer crashes in line 1 if a model was added to a combobox without specifying the currentIndex parameter.
This one crashes after closing and re-opening the ui.qml file:
import QtQuick 2.9 import QtQuick.Controls 2.2 Page { id: page title: qsTr("Test Page") ComboBox { id: filterLog model: ListModel { id: filter_log_model ListElement { text: "Pass All" } ListElement { text: "Pass Flash" } } } }
This one works.
import QtQuick 2.9 import QtQuick.Controls 2.2 Page { id: page title: qsTr("Test Page") ComboBox { id: filterLog currentIndex: 0 model: ListModel { id: filter_log_model ListElement { text: "Pass All" } ListElement { text: "Pass Flash" } } } }
It is important to close the file after the currentIndex was removed to trigger the error. Otherwise the value seems to be cached.