3аполняю таблицу 3начениями, ра3 от ра3у часть английских слов вводится, а сейчас как на картинке
#pragma once
#include <ctime>
#include <cstring>
#pragma warning(disable : 4996)
class Task
{
public:
int id;
char* task;
int parentTask;
char* executor;
int idExecutor;
tm* dateStart;
tm* dateDeathLine;
char* status;
char* oldtask;
Task();
void AddTask(char* task_, int parentTask_, char* executor_,
int idExecutor_, tm* dateDeathLine_);
void DeleteTask(int num);
~Task();
};
#include "Task.h"
Task::Task()
{
task = new char[1024];
executor = new char[256];
status = new char[64];
oldtask = new char[2048];
dateDeathLine = new tm();
dateStart = new tm();
};
vector<vector<string>> v;
vector<string> tmp;
char* date_string = new char[50];
for (int i = 0; i < db.vTask.size(); i++)
{
tmp.push_back(to_string(db.vTask[i].id));
tmp.push_back(db.vTask[i].task);
tmp.push_back(to_string(db.vTask[i].parentTask));
tmp.push_back(db.vTask[i].executor);
strftime(date_string, 50, " %Y-%m-%d", db.vTask[i].dateDeathLine);
tmp.push_back(date_string);
strftime(date_string, 50, "%Y-%m-%d", db.vTask[i].dateStart);
tmp.push_back(date_string);
tmp.push_back(db.vTask[i].status);
tmp.push_back(db.vTask[i].oldtask);
v.push_back(tmp);
tmp.clear();
}
for(int i=0;i<db.numRow;i++)
for (int j = 0; j < db.numCol; j++)
{
qstr = QString::fromStdString(v[i][j]);
table.setItem(i, j, new QTableWidgetItem(qstr));
}