Thanks for reply.
I did that:
Code:
itab = tableWidget->item(0,0);
itab->setText("X");
QTableWidgetItem *itab;
itab = tableWidget->item(0,0);
itab->setText("X");
To copy to clipboard, switch view to plain text mode
Result (during running the program (compilation OK)):
Program works correctly when I delete "itab->setText("X");", but without any result, ofc.
Program works correctly too when I delete "itab = tableWidget->item(0,0);", so this 2 lines collide.
EDIT:
I tried this:
Code:
itab->text() = "X";
tableWidget->setItem(0, 0, itab);
QTableWidgetItem *itab;
itab->text() = "X";
tableWidget->setItem(0, 0, itab);
To copy to clipboard, switch view to plain text mode
And this:
Code:
itab->text() = "X";
tableWidget->item(0,0);
QTableWidgetItem *itab;
itab->text() = "X";
tableWidget->item(0,0);
To copy to clipboard, switch view to plain text mode
But the result is:
EDIT XXX:
It's very very funny, look:
itab->text() = "X";
label -> setText(cyce);
QTableWidgetItem *itab;
itab->text() = "X";
QString cyce = itab->text();
label -> setText(cyce);
To copy to clipboard, switch view to plain text mode
OR
itab -> setText("X");
label -> setText(cyce);
QTableWidgetItem *itab;
itab -> setText("X");
QString cyce = itab->text();
label -> setText(cyce);
To copy to clipboard, switch view to plain text mode
And the result is of course:
Dunno. It looks like setText and itab->text() = "X"; are wrong here.
Bookmarks