Hi guys:

I want to use a QListView and a QFilesystemModel to customize an icon viewer like the original one in Mac!!!

The original Mac icon viewer:


And the custom icon viewer:


The problem is that the file name in the custom icon viewer can only display single line, however, the original Mac icon viewer can display file name in two lines.

What I should do to make the custom icon viewer displays the file name in two lines.
If two line can not contain all the file name, show ellipsis at the right side of the second line.

Should I subclass QStyledItemDelegate and override paint() function or something else?!?!

Could anyone give me a hint!!

Thanks in advance!!

Kenny