How can I determine the height of a single item in a QListWidget? I'm looking for the equivalent of Q3ListBox::itemHeight, or MFC's CListBox::GetItemHeight:
http://msdn.microsoft.com/en-us/library/d5804hcf.aspx
Printable View
How can I determine the height of a single item in a QListWidget? I'm looking for the equivalent of Q3ListBox::itemHeight, or MFC's CListBox::GetItemHeight:
http://msdn.microsoft.com/en-us/library/d5804hcf.aspx
Using visualRect you can determine the height.
or you can directly go for QListWidget::visualItemRect(QListWidgetItem);
Thanks guys! QListWidget::visualItemRect worked, but the more generic QAbstractItemView::visualRect returned a height of zero. I'm not sure why there's a discrepancy. :confused:
How did you call QAbstractItemView::visualRect ???