Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, March 2007
setAlternatingRowColors


Message 1 in thread

Hi there,

I would like to draw de background of the rows inside a QTreeWidget with 
different colors, I can use setAlternatingRowColors ( bool enable ) but it 
is too limited. I would like to be able to draw every 4 rows not only every 
two.

Any idea?

Thanks
Cheers
Nil

_________________________________________________________________
Personnalisez votre Messenger avec Live.com 
http://www.windowslive.fr/livecom/

--
 [ signature omitted ] 

Message 2 in thread

On 04.03.07 20:54:40, nilitonilito nilitonilito wrote:
> Hi there,
> 
> I would like to draw de background of the rows inside a QTreeWidget with 
> different colors, I can use setAlternatingRowColors ( bool enable ) but it is 
> too limited. I would like to be able to draw every 4 rows not only every two.
> 
> Any idea?

Either set the background color using setData and a proper role, or
implement a custom delegate that does this.

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

>Either set the background color using setData and a proper role, or
>implement a custom delegate that does this.

Wow, a new world opens to me, Thanks!

Nil

>
>Andreas
>
>--
>You could live a better life, if you had a better mind and a better body.
>
>--
>To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
>"unsubscribe" in the subject or the body.
>List archive and information: http://lists.trolltech.com/qt-interest/
>

_________________________________________________________________
Gagnez des pc Windows Vista avec Live.com http://www.image-addict.fr/

--
 [ signature omitted ]