Forum
Sign Up
× DataGrid for Qt.C++

Implement setHeaderData in QAbstarctItemModel not

7 years 42 minutes ago #1 by Jennifer
I have created a vector for header data which changes dynamically. This vector vector gets updated and my column sequence gets changed which I want to be updated in my QtitanGrid but unfortunately setHeaderData is not working with this case.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #2 by Piotr
Hi Stephanie,

Could you give an example, in order to properly understand what's going on?

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #3 by Developer Machines
Stephane, what version of the component you use?

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #4 by ssss
I have the same Problem in Grid7.1 when I use QAbstractTableModel, "headerDataChanged" donot work,and I cannot change head of tableview dynamicly

void TableModel::setHorizontalHeader(const QStringList &headers)
{
m_HorizontalHeader = headers;

emit headerDataChanged(Qt::Orientation::Horizontal,0,m_HorizontalHeader.count()-1);
}

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.162 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )