[PyQt] vertical alignment of richtext in a table view
Wolfgang Rohdewald
wolfgang at rohdewald.de
Tue Sep 7 11:56:59 BST 2010
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100907/cb97a4cc/attachment.html>
More information about the PyQt
mailing list