PDA

View Full Version : QTableWidget



Afflicted.d2
11th November 2006, 22:10
Hi, I'm trying to verify whether a QTableWidget is empty or partially empty, I want to assert that all cells of the table are filled out... before proceeding, how can I do this.. These are my silly attempts:

1st attempt

if (table->itemAt(1,i)->text().isEmpty())
{
resultLabel->setText(QString("Please fill the table completely\n") +
return false;
}

2nd attempt

if (!table->cellChanged(0,i))
{
resultLabel->setText(QString("Please fill the table completely\n") +
return false;
}

fritz
16th November 2006, 04:42
try



if (table->itemAt(1,i)->data(0).toString().isEmpty())