[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Fwd: drawComplexControl
From:       Oleg Klimov <omgtech () gmail ! com>
Date:       2007-12-23 16:35:09
Message-ID: 1198427709.9048.15.camel () kot-laptop
[Download RAW message or body]

On Sun, 2007-12-23 at 17:11 +0100, Attila Olah wrote:
> To put it straight:
> 
> Is it possible to *always* show a complex widget in a tree/table cell
> without writing my own paint()?
> 
> My current opinion is NO, not even in C++.

Widget is more then paint(), it should be also mouseMove(),
keyPressed(), focusMove() etc.

For widget to integrate nicely into another widget, the latter must
support child widgets. I'm almost sure QTreeWidget does support widgets
within cells. Look at the QTreeWidget::setItemWidget().

If it doesn't work, try subclassing TreeItem. I've tried it in qt3/c++,
works quite well, my task was simply to make a separator. For start, you
likely will have to override size hints, paint, get some columns
geometry from header().

 Oleg


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic