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;
}
if (table->itemAt(1,i)->text().isEmpty())
{
resultLabel->setText(QString("Please fill the table completely\n") +
return false;
}
To copy to clipboard, switch view to plain text mode
2nd attempt
if (!table->cellChanged(0,i))
{
resultLabel
->setText
(QString("Please fill the table completely\n") + return false;
}
if (!table->cellChanged(0,i))
{
resultLabel->setText(QString("Please fill the table completely\n") +
return false;
}
To copy to clipboard, switch view to plain text mode
Bookmarks