[Qt-interest] TableWidget cellChanged(r,c) of nonexistend item ??
Matthias Pospiech
matthias.pospiech at gmx.de
Sat Jan 10 19:54:11 CET 2009
I have the following slot, called at cellChanged(int row, int column ).
void DialogGratingPeriodVariation::On_tableWidgetDevices_cellChanged(int
row, int column )
{
if (CouplerSetupList.size() == 0)
return;
if (column = 1)
{
QTableWidgetItem * item = tableWidgetDevices->item(row, column);
CouplerSetupList[row].Description = item->text();
...
This is called at startup at the creation
newItem = new QTableWidgetItem(buffer);
tableWidgetDevices->setItem(i, 0, newItem);
However it crashes because the item pointer is 0.
What am I doing wrong?
Matthias
More information about the Qt-interest-old
mailing list