QTreeWidget set height of each row depending on content
Posted
by serge
on Stack Overflow
See other posts from Stack Overflow
or by serge
Published on 2010-04-15T10:21:37Z
Indexed on
2010/04/15
10:23 UTC
Read the original article
Hit count: 540
Hi everyone,
I want to make editable cells with multi-lines content in QTreeWidget and I use for this purpose QPlainTextEdit as a delegate. I need to set proper size to all rows that switching between editing and displaying went smooth, without any visible changes.
rect = textEdit.blockBoundingRect(textEdit.firstVisibleBlock())
- with this I can find out the height I need to set for the row, but I missing the place where I can do it.
How can i set proper height to QTreeWidget's rows on initialization stage?
Thank you in advance, Serge
© Stack Overflow or respective owner