I have a QListView with a custom implementation of QItemDelegate. MyItemDelegate re-creates createEditor () to display the custom widget. The size of the widget depends on the content. By default, the height of each line is about 20 pixels (one line), but my editor has a large height. I tried to override the QItemDelegate :: sizeHint () method, but does not contain an editor link, so I could not calculate the correct size.
How can I resize rows in a QListView to the actual editor size?
source
share