Qt Quick Controls FileDialog onAccepted handler can not destroy objects right away on Linux
-
For example, if I open the Qt Quick Controls Texteditor example and add a line of code, destroying some qml object in onAccepted handler, it will not work:
@FileDialog {
id: fileDialog
nameFilters: ["Text files (.txt)", "HTML files (.html)"]
onAccepted: {
fontFamilyComboBox.destroy()
document.fileUrl = fileUrl
}
}@
The fontFamilyComboBox will not be destroyed. However, when I add parameter to destroy(), starting from 1 ms and more, it works. I have this problem only on Linux, with Qt 5.2.1 and 5.3.0. Compiling the same code on Windows or for Android does not have this problem. What could be a possible reason of such behaviour?