HI ,

i am trying to diaplay data in QTablewidget like this ..


#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QTableWidget tableWidget(3,3);

for (int row=0;row<tableWidget.rowCount(); row++)
for (int col=0;col<tableWidget.columnCount(); col++)
{
QTableWidgetItem item;
item.setText(QString("ABC"));
tableWidget.setItem(row, col,&item);
}
tableWidget.show();
return app.exec();
}
It is not displaying any data.
But when i placed this data in above for loop it is crashing.

Please help me........