Unsolved QListWidget adjusting the height of list item to display complete text
-
Hi,
We are trying to display some text strings in QListWidget. Each string is dynamically received from backend. We are using boundingRect method of font metrics to determine the list item height to display each string for a fixed width. Unfortunately it is not working properly. Can any one please tell what is the right approach to achieve this using QListWidget.Thanks
-
@arju.ach said in QListWidget adjusting the height of list item to display complete text:
unfortunately it is not working properly
In what way not working ?
Using font metrics sounds right to me. -
It is not giving the proper height. I am giving the width to list widget width.
-
@arju.ach
and you make sure you use same font as it will be painted in?
Its normally quite exact except for special fonts.