文档是这样说的:
wordWrap : bool
This property holds the item text word-wrapping policy.
If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is true by default.
Note that even of wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current textElideMode.This property was introduced in Qt 4.3.
所以说,这个设置是无法达到你想要的效果的。
解决方法:我认为你应该考虑使用QTableView,
具体可以参考:
http://www.qtcentre.org/archive/index.php/t-5650.html希望可以帮到你,如果觉得这个方法可行的话,希望楼主能把实现结果分享一下哈~~~
[ 此帖被linxy在2011-04-13 09:32重新编辑 ]