[SOLVED] Retrieving data from QTableWidget
Hi,
I'm creating a QTableWidged based on my text file like this:
Code:
char readword[50]="";
for(i=0; i<6; i++)
{
for(j=0; j<5; j++)
{
fscanf(input,"%s", &readword);
refTable->setItem(i, j, refItem);
}
}
Then I'd like to see if I get the correct entru back out of the table (testing with location 1,1):
Code:
QString celltext; celltext
=item
->text
();
char print
[50];
strcpy(print, celltext.
toLocal8Bit().
constData());
fprintf(output,"%s\n", print);
However, I'm not getting the same text back as what was in the input file. I'm getting text from a location other than 1,1.
I'd be very thankful for any help. It seems that I don't know how to handle QTAbleWidget or QTableWidgetItem