PDA

View Full Version : setSpan in delegate



Gbx
12th November 2016, 12:15
Hello!
It is necessary to combine individual cells depending on the content. Using QTablwiew::setSpan consider irrational, because after sorting it broken.
I want to make it through a delegate, but don't know how to use setSpan method in delegate, please help!

ChrisW67
15th November 2016, 19:26
A delegate is responsible for drawing and editing a single cell. The delegate is given the bounds of the screen space it is to occupy and has no way to merge with the cell next to it.

A delegate can use the content of several model indexes, say two columns from the same row, or several model roles to determine what to render into the single cell space it has.