diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-08 15:58:18 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-10 14:33:09 +0200 |
commit | 332011c8e6a96cd2b0c685b72f96337660f690e0 (patch) | |
tree | 9952ca1f799b65c7fd91d0a65ab043b92361fbbe /src/quicktemplates2/qquickstackview_p.cpp | |
parent | de66c7e6c4ae03d1da2225dc443a028bf5f6e722 (diff) |
Doc: some ComboBox functions must be used after component completion
The internal QQmlDelegate model may not be ready until after
componentComplete() is called. For example, the following code will
print -1 for the find call, even though printing the model will
show the "Hello" entry:
ComboBox {
id: comboBug
anchors.centerIn: parent
model: ["123", "BlaBla", "Hello", "Turtle"]
currentIndex: {
console.log("Model: " + comboBug.model)
console.log("Find: " + comboBug.find("Hello"))
return comboBug.find("Hello")
}
}
Fixes: QTBUG-94257
Pick-to: 6.1 6.2
Change-Id: I6e8c2a4eb8ca7ffca0a38d2f2e914cf791d3bd2e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickstackview_p.cpp')
0 files changed, 0 insertions, 0 deletions