Subject: Re: QTreeView setFirstColumnSpanned?

Amit Chaudhuri amit.k.chaudhuri at gmail.com
Tue Jun 11 14:54:02 PDT 2013


..can we maybe do this with an additional role (TRIP_ROLE) in the model..?
Setting the data according to the role would work. But we're then back to
where we to setFirstColumnSpanned..


On Tue, Jun 11, 2013 at 10:04 PM, Linus Torvalds <
torvalds at linux-foundation.org> wrote:

> On Tue, Jun 11, 2013 at 1:41 PM, Tomaz Canabrava <tcanabrava at kde.org>
> wrote:
> >
> > but we can test if index has children, if it does, trip.
>
> Oh, that's not the problem.
>
> The problem is *where*.
>
> Every time we change the model, do we have to iterate over all of the
> QTreeView entries?
>
> *That* is the insane part of the interface.We'd presubaly have to
> intercept "model changed" events, only to then walk all the treeview.
> Ugh. All just because the QTreeView::setFirstColumnSpanned interface
> is badly integrated with the model.
>
> The silly part is, QTreeView already calls down to the model for
> almost everything else. So *if* the interface had been similar to the
> "what font should I use for this model entry" model callbacks (just a
> different role: Qt::FirstColumnSpannedRole) it would have been
> trivial, and worked really well.
>
> I've googled peoples use of setFirstColumnSpanned(), and pretty much
> all I find is complaints and people asking how to use it.
>
>                   Linus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130611/812eba14/attachment.html>


More information about the subsurface mailing list