Correct wordwrapped text handling in QListView icon mode
authorSamuel Gaist <samuel.gaist@edeltech.ch>
Fri, 22 Nov 2013 23:15:30 +0000 (00:15 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 15 Jan 2014 14:10:25 +0000 (15:10 +0100)
commit31015df188e0a88317205b212f317302a235cb9b
tree05b249505691465f102e6530c4ae73753754f624
parent032baf26784c2ee45bec3f9bfe81f6e7158491d3
Correct wordwrapped text handling in QListView icon mode

Currently a QListView with wordwrapping activated will wrap the text
only to the width of the icon even if the grid size is bigger. With this
patch the option rect is now updated to match the grid size if valid
and the style uses it to determine the correct size when wrapping

[ChangeLog][QtWidgets][QTBUG-4714] Use the grid size for wordwrapping
when available in icon mode
Task-number: QTBUG-4714
Change-Id: I2cb63809d3ee8bd262f38bc11de91df9ff5cf237
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
(cherry picked from qtbase/a761be2fb2191215426f904cb03df0e966214531)
src/gui/itemviews/qlistview.cpp
src/gui/styles/qcommonstyle.cpp