On Dienstag 07 September 2010, Mark Summerfield wrote: > I should have mentioned before that it is better to inherit > from QStyledItemDelegate rather than QItemDelegate. I'd try > that first & see if that improves things at all.
makes no difference. > The offset you need might be made up of the > option.decorationSize's width; not sure about the height > offset. decorationSize is (16,16) - that does not explain it. > Using QTextDocument is fine for computing the size hint, > although for efficiency you might create a class-level > QTextDocument and reuse it. done. > (There are other possibilities > too, that I cover in Advanced Qt Programming, but can't > recall off hand.) just ordered. I hope it is as excellent as your book about rapid GUI programming with Python and Qt. my latest version of this delegate is here: http://websvn.kde.org/trunk/KDE/kdegames/kajongg/src/genericdelegates.py?view=markup -- Wolfgang
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt