Re: [PyQt] vertical alignment of richtext in a table view

2010-12-19 Thread Mark Summerfield
Hi Wolfgang, On Sat, 18 Dec 2010 18:56:36 +0100 Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Dienstag 07 September 2010, Mark Summerfield wrote: The offset you need might be made up of the option.decorationSize's width; not sure about the height offset.

Re: [PyQt] vertical alignment of richtext in a table view

2010-12-18 Thread Wolfgang Rohdewald
On Dienstag 07 September 2010, Mark Summerfield wrote: 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. Then I'm not sure. Could try experimenting with the label's

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-07 Thread Mark Summerfield
On Tue, 7 Sep 2010 01:37:45 +0200 Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Montag 06 September 2010, Mark Summerfield wrote: I'm tending to use a differnt approach for rich text delegates nowadays. Instead of using a QTextDocument, I store a class-level QLabel, something like

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-07 Thread Wolfgang Rohdewald
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

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-07 Thread Mark Summerfield
On Tue, 7 Sep 2010 12:56:59 +0200 Wolfgang Rohdewald wolfg...@rohdewald.de wrote: 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

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-06 Thread Mark Summerfield
Hi Wolfgang, On Sun, 5 Sep 2010 10:55:04 +0200 Wolfgang Rohdewald wolfg...@rohdewald.de wrote: Hi, in Mark Summerfields book Rapid GUI programming with Python and QT, there is an example on page 485 with a table column having a delegate that displays richtext. In the book, the text in this

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-06 Thread Wolfgang Rohdewald
On Montag 06 September 2010, Mark Summerfield wrote: I'm tending to use a differnt approach for rich text delegates nowadays. Instead of using a QTextDocument, I store a class-level QLabel, something like this: your solution certainly looks cleaner than my temporary fix

[PyQt] vertical alignment of richtext in a table view

2010-09-05 Thread Wolfgang Rohdewald
Hi, in Mark Summerfields book Rapid GUI programming with Python and QT, there is an example on page 485 with a table column having a delegate that displays richtext. In the book, the text in this column has a vertical alignment in the middle of the cells, just like the other columns. but if I