Subject: Re: QTreeView setFirstColumnSpanned?

Tomaz Canabrava tcanabrava at kde.org
Tue Jun 11 11:34:09 PDT 2013


Em 11/06/2013 13:01, "Linus Torvalds" <torvalds at linux-foundation.org>
escreveu:
>
> On Tue, Jun 11, 2013 at 6:45 AM, Dirk Hohndel <dirk at hohndel.org> 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).

Agreed. There was a tryout of doing a better design of the qt models a
while ago, but it got discarded. I'm with that code looking, reading,
studying it to see if I can come with something usable. If I make good
progress, will replace the models on subsurface with this new way.

But if we want subsurface to release soon, this will not be used now. =)

>
>                         Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130611/1d4e3653/attachment.html>


More information about the subsurface mailing list