char cstr[80];
memset(cstr,' ',80*sizeof(char)); // Fill with 80 spaces
strncpy(cstr, desc[row],strlen(edesc[row])); // copy few chars into cstr , length does not exceed 40
strncpy(&cstr[40],(const char *)stime,strlen(stime));
strncpy(&cstr[47],"to",strlen("to"));
strncpy(&cstr[51],(const char *)etime,strlen(etime));
strncpy(&cstr[70], (const char *)date,strlen(date));
cstr[79]='\0';
item(row,1)->setText(qstr);
char cstr[80];
memset(cstr,' ',80*sizeof(char)); // Fill with 80 spaces
strncpy(cstr, desc[row],strlen(edesc[row])); // copy few chars into cstr , length does not exceed 40
strncpy(&cstr[40],(const char *)stime,strlen(stime));
strncpy(&cstr[47],"to",strlen("to"));
strncpy(&cstr[51],(const char *)etime,strlen(etime));
strncpy(&cstr[70], (const char *)date,strlen(date));
cstr[79]='\0';
QString qstr = cstr;
item(row,1)->setText(qstr);
To copy to clipboard, switch view to plain text mode
Bookmarks