Hi Mitch,
On 12.07.2023 09:52, EXT Mitch Curtis wrote:
Context: We have been hit by
https://codereview.qt-project.org/c/qt/qtdeclarative/+/472596
(which is even marked as "Important Behavior Change") ending up
only in 6.5.1. It was quite the headache figuring out that 6.5.0 ->
6.5.1 has broken part of our ListViews.
I'm sorry to hear that.
As the developer who approved the change, I've left my thoughts
here:
https://bugreports.qt.io/browse/QTBUG-114166?focusedId=734562&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-734562
In summary, I believe the official branch policy was followed here.
I'm not sure if your use case is the same as the snippet in the bug
report, so it would be useful if you could share it so that we can
see if there's a legitimate usage that we've broken. That's not to
say that it's good to introduce regressions, of course, but often
it's hard to know how users are using APIs and we often only find out
after the change has been merged, because auto tests can't cover
every use case for the same reason.
We have a vertical ListView which shows icon-only buttons. The buttons
all have the same width, but depending on the icon size and/or the
style, that width may differ. So we update the contentWidth of the
ListView as soon as the first button is loaded. Something like this:
ListView {
id: sidebar
Layout.fillHeight: true
implicitWidth: contentWidth
model: // ...
delegate: IconButton {
icon.name: // ...
onImplicitWidthChanged: if (sidebar.contentWidth < 0) {
sidebar.contentWidth = implicitWidth
}
}
}
Maybe we're doing this wrong; but I didn't find any other viable way to
have a ListView auto-determine the size in the non-scrollable dimension
based on its content.
--
Arno Rehn
Tel +49 89 189 166 0
Fax +49 89 189 166 111
a.r...@menlosystems.com
www.menlosystems.com
Menlo Systems GmbH
Bunsenstrasse 5, D-82152 Martinsried, Germany
Amtsgericht München HRB 138145
Geschäftsführung: Dr. Michael Mei, Dr. Ronald Holzwarth
USt.-IdNr. DE217772017, St.-Nr. 14316170324
--
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development