or you can directly go for QListWidget::visualItemRect(QListWidgetItem);
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.![]()
How did you call QAbstractItemView::visualRect ???
Now that I try it again, it works.
At the end itemRect1 == itemRect2;Qt Code:
To copy to clipboard, switch view to plain text mode
Bookmarks