[Qt-interest] delegate and multi line text

david.jobet at free.fr david.jobet at free.fr
Sun Oct 18 16:51:14 CEST 2009


Well, it won't solve my issue : I have a model that has 6 columns, but I want to show only 5 in my view by merging the content of 2 columns into one.

I can do that with a proxy or with a delegate.

I prefer the delegate because I think it is lighter and it's really a view problem : I'm not filtering, adding or removing stuff from the model : I'm really just trying to improve the lisibility of the row by merging two things together.

So I hide a column from my view and use a custom delegate to display the content of the 2 columns into one.

Anyway, before doing that, I wasn't seeing the line breaks in my 2 original columns.
I haven't tried to disable the elide mode, but looking at qt's code, it really seems like everything is either not wrapped (wrap mode = Manual) : it shows up in 1 line only, or wrapped, and in that case it does shows up on multiple lines, but the problem is the wrap mode default to 'word' internally and I don't see how I can say I want a 'line break' wrap mode.

I'll give it a try anyway.

Any other ideas ?

David

----- Mail d'origine -----
De: Jan <janusius at gmx.net>
À: qt-interest at trolltech.com
Envoyé: Sat, 17 Oct 2009 12:55:03 +0200 (CEST)
Objet: Re: [Qt-interest] delegate and multi line text

Hi,

Isn't the default delegate supporting line breaks? AFAIK you can set the 
elide mode to "Non" and if you do not fix rowsize the delegate should 
display line breaks.

Jan
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest






More information about the Qt-interest-old mailing list