Comment 2 for bug 1603450

Revision history for this message
Andrea Bernabei (faenil) wrote :

The problem here is ListItemLayout's labels have "WrapAnywhere" set by default, for convenience.

From QML Text documentation:
"If this property is set to Text.ElideRight, it can be used with wrapped text."

That is why nothing is happening when you set ElideMiddle. It's not compatible with wrapped text :9

I noticed that the ListItemLayout documentation does mention anything about the wrapping mode of the labels that it contains, and that's why the developers are confused when they notice ElideMiddle does not work.

We have 2 options:
1) Default to NoWrap for the title, so that other elision modes will work without having to manually also set NoWrap
2) Amend ListItemLayout documentation to mention that the default wrapMode is not the same as QML Text's.

I'll have a quick chat with the designers to see what they think. The requirements was to have a sensible wrapMode by default, but given the confusion it can bring, maybe we could revisit that.