Subject: Re: QTreeView setFirstColumnSpanned?

Linus Torvalds torvalds at
Tue Jun 11 09:01:18 PDT 2013

On Tue, Jun 11, 2013 at 6:45 AM, Dirk Hohndel <dirk at> wrote:
> So you are saying I should apply Linus' patch as is and you'll clean up
> from there?

Don't take my patch as-is, because it literally results in nothing
getting drawn at all for the trip entries, because right now it has
just a comment about drawing something.

You could do my patch with the "return" removed (so that the trip
entry drawing code falls through to the default case), of course. Then
everything gets drawn the same way, it just has the logic in place to
draw trips differently.

I still hope somebody would come up with how setFirstColumnSpanned()
is supposed to be used, but that thing really does seem to be
seriously mis-designed. The *logical* design would be that there would
be a "role" callback to the underlying model (like you can currently
set background and foreground colors etc - you could have the model
say "this row is spanned") but the Qt setFirstColumnSpanned() thing
really seems to be something that you have to call programmatically at
the QTreeView level, and the model itself can't do anything. Really
bad design, if so (and it really does seem to be so).


More information about the subsurface mailing list