C++ (Qt) bool insertColumns(int startcol, int count, const QModelIndex &parent) { if(startcol!= m_nColumns) {return false;} beginInsertColumns(QModelIndex(), startcol, startcol+count-1); m_nColumns += count; endInsertColumns(); return true; }
C++ (Qt) bool insertColumns(int startcol, int count, const QModelIndex &parent) { beginInsertColumns(QModelIndex(), startcol, startcol+count-1); if(column != m_nColumns) {changeHashKeysForColumnsMore(startcol, count);} m_nColumns += count; endInsertColumns(); return true; }void changeHashKeysForColumnsMore(int StartColumn, int Offset) {//...}
C++ (Qt)QString getKey(int row, int column) QString key(QString::number(row)); key.append("."); key.append(QString::number(column)); return key;}