Important: Please read the Qt Code of Conduct -

How do you get the number of visible rows in a single-column QListView?

  • I am using a QListView that displays only a single column where the values are text-only and the item size is uniform. The list is in a layout and will change height whenever the user resizes the window. I need to keep to keep track of the number of visible rows (NOT items) the list has available at any given time. I suspect that the list keeps track of this value internally for the page up/page down QAbstractItemView capability, but I have not found a way this value can be retrieved.

Log in to reply