[PyQt] embedding iconic pushButton in TableView and/or TreeView

James Polk jpolk5001 at yahoo.com
Wed Nov 24 18:10:05 GMT 2010

>I've transcoded the stardelegate example a few weeks ago, which uses a 
>custom widget in a QTableView, but due to the model/view/delegate 
>pattern, that should be easy to map onto your problem.

Thanks for your reply, Pete...

I reread chap's 14,15, and 16 from Mark Summerfield's book overnight, and it made things a bit clearer...I need to create a 
custom delegate...

I think I also need to do a sanity check about whether to use 
QTableView or QTreeView.  Since the heart of my application is
to be able to sort various categories based on various criteria,
I chose to use the example program "BasicSortFilter" as a starting
point,...the "SortFilter" process gives me just what I need, and it
used QTreeView with decoration(false) to make it appear tabular.

It also looks like custom delegates are easier to implement in
TableView, rather than TreeView, but that difference may be 
more superficial than real.

I'll do a search for your stardelegate code and see what I can learn
from it.  Many Thanks for offering that ;-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101124/eea2a545/attachment-0001.html>

More information about the PyQt mailing list