Unsolved headerData
-
viewerTreeModel::headerData(int section, Qt::Orientation orientation,
int roleIn in above tree model I have 13 columns but it leading headerData is not called for all columns
in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns
-
Qt Enthusiast about a minute ago
viewerTreeModel::headerData(int section, Qt::Orientation orientation,
int roleIn in above tree model I have 13 columns but it leading headerData is not called for all columns
in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns
I have called hide columns in between -
@Qt-Enthusiast
Hi. Just before answering your question, a word for you about your posts.A couple of times I have noticed you post like this, where you make post, and then when you want to alter its content you make a brand new second post. Are you aware that after you have made a post there is a vertical
...
button at the lower-right of your posts (to the right of thereply quote ^0v
)? You can left-click on that and pick Edit. That allows you to edit your own posts to change it. You do not need to make a new post or delete the original one. That's much clearer for you and anyone else trying to answer! :)Now to your question. It is your code which calls
QAbstractItemModel::setHeaderData()
for each column, so it's up to you what columns you do or do not call it on, so I'm not sure just what you are asking about. The fact that you have hidden some columns is not relevant, and the column number (section
) that you pass is still range0
to12
. -
@Qt-Enthusiast said in headerData:
in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns
I have called hide columns in betweenNo, because there's no fathomable reason to query the model for the header data if there's no need to display anything.