PDA

View Full Version : How to get count of items in QListView column?



qt-closer
25th October 2010, 07:22
Hello, All

The QListView widget have enabled isWrapping property, therefore it widget have several columns. How to get count of items per column?

Thanks

Lykurg
25th October 2010, 07:27
isWrapping doesn't change columns nor rows. In general ask the underlaying model for any information.

qt-closer
25th October 2010, 07:58
In general ask the underlaying model for any information.

Do you know how to do it? or it's your guess?

P.S.
I have read docs about QListView, QAbstractItemView, QAbstractItemModel, etc (+ read sources) and didn't found a way how to get count of items per column.

Lykurg
25th October 2010, 14:40
Do you know how to do it? or it's your guess?Let me think a minute. Ehm, no, I know it:cool:



I have read docs about QListView, QAbstractItemView, QAbstractItemModel, etc (+ read sources) and didn't found a way how to get count of items per column.The problem is, what do you mean by "items per column"? Do you whant the row count? You can also have a look at the header to see, how many columns are actually shown.