I'm trying to give a network request based on a QTableWidget's cell data. If a QTableWidgetItem isn't set to a particular cell, then if I try to read the cell's text, the application crashes. Even after I check if the cell data isEmpty() or isNull() doesn't solve the issue as the item itself isn't present.
Is there any way tht I can find the existence of a QTableWidgetItem in QTableWidget ?

Qt Code:
  1. QString hRef = QTableWidget::item(nRow, nCol)->text(); // crashes here
  2. if( hRef.isEmpty() || hRef.isNull() )
  3. {
  4. return;
  5. }
To copy to clipboard, switch view to plain text mode