TreeModel::TreeModel (const QStringList& headers, QObject *parent) : QAbstractItemModel (parent) , RootItem_ (0) { QVector<QVariant> rootData; std::for_each (headers.begin (), headers.end (), [&rootData] (decltype (headers.front ()) header) { rootData << header; }); RootItem_ = new TreeItem (rootData); }
TreeModel::TreeModel (const QStringList& headers, QObject *parent) : QAbstractItemModel (parent) , RootItem_ (0) { QVector<QVariant> rootData; rootData << headers; RootItem_ = new TreeItem (rootData); }
std::for_each (headers.begin (), headers.end (), [&rootData] (decltype (headers.front ()) header)