ModelTeamPrepareProxy::ModelTeamPrepareProxy(QObject *parent): QSortFilterProxyModel(parent){}ModelTeamPrepareProxy::~ModelTeamPrepareProxy(){}bool ModelTeamPrepareProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const{ qd << " left < " << left.data(Qt::DisplayRole).toString(); qd << " right > " << right.data(Qt::DisplayRole).toString(); if (left.parent() != right.parent()) { qd << "dif parents "; qd << " left < " << left.parent().data(Qt::DisplayRole).toString() << " - " <<left.parent(); qd << " right > " << right.parent().data(Qt::DisplayRole).toString() << " - " << right.parent(); //return true; } if (left.data(Qt::DisplayRole).toString() < right.data(Qt::DisplayRole).toString()) { return true; } return false;}
"634 - mdlPrepare.cpp" left < "(3) Не ждали""635 - mdlPrepare.cpp" right > "(5) Команда Балаша Касумова""634 - mdlPrepare.cpp" left < "(5) Команда Балаша Касумова""635 - mdlPrepare.cpp" right > "(3) Не ждали""634 - mdlPrepare.cpp" left < "(0) Инфи Ёжики""635 - mdlPrepare.cpp" right > "(3) Не ждали""634 - mdlPrepare.cpp" left < "(3) Не ждали""635 - mdlPrepare.cpp" right > "(0) Инфи Ёжики""634 - mdlPrepare.cpp" left < "Geksogen""635 - mdlPrepare.cpp" right > "___DUST___""634 - mdlPrepare.cpp" left < "___DUST___""635 - mdlPrepare.cpp" right > "Geksogen""634 - mdlPrepare.cpp" left < "Brom GG""635 - mdlPrepare.cpp" right > "Geksogen""634 - mdlPrepare.cpp" left < "Geksogen""635 - mdlPrepare.cpp" right > "Brom GG""634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > "Brom GG""639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"641 - mdlPrepare.cpp" right > "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "634 - mdlPrepare.cpp" left < "Brom GG""635 - mdlPrepare.cpp" right > """639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "641 - mdlPrepare.cpp" right > "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > """634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > "___DUST___""639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"641 - mdlPrepare.cpp" right > "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "634 - mdlPrepare.cpp" left < "___DUST___""635 - mdlPrepare.cpp" right > """639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "641 - mdlPrepare.cpp" right > "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > "Geksogen""639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"641 - mdlPrepare.cpp" right > "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "634 - mdlPrepare.cpp" left < "Geksogen""635 - mdlPrepare.cpp" right > """639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "641 - mdlPrepare.cpp" right > "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > "Brom GG""639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"641 - mdlPrepare.cpp" right > "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "634 - mdlPrepare.cpp" left < "Brom GG""635 - mdlPrepare.cpp" right > """639 - mdlPrepare.cpp" dif parents "640 - mdlPrepare.cpp" left < "(3) Не ждали" - QModelIndex(1,0,0x2fa4a0,ModelTeamPrepare(0x2fa388) ) "641 - mdlPrepare.cpp" right > "" - QModelIndex(-1,-1,0x0,QObject(0x0) )"634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > """634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > """634 - mdlPrepare.cpp" left < """635 - mdlPrepare.cpp" right > "___DUST___".... и так далее, длинно-длинно
int ModelTeamPrepareProxy::rowCount(const QModelIndex &parent ) const{ static int cnt; cnt = this->sourceModel()->rowCount(this->mapToSource(parent)); return cnt;}