[Qt-interest] Using QPushButton in QItemDelegate
Andy Bell
andy.bell at allbabel.com
Thu Apr 2 20:40:45 CEST 2009
Hi,
I am working on a custom QItemDelegate for a QListView. I want to be able
to display a number of things using the paint method of QItemDelegate, an
icon, some text, a couple of buttons and a progress bar.
What I can't work out is how to hook up the a click event of the QPushButton
as I am only really drawing the item using QStyle::drawControl. Anyone have
any ideas on how I can get this to work? I have looked at setIndexWidget to
set the widget for each QModelIndex but that seems a little heavy for the
job as I could have thousands of items.
Thanks in advance
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090402/24a4fc2b/attachment.html
More information about the Qt-interest-old
mailing list