chaosgeorge
22nd November 2006, 06:27
Hi, i want to customize a QTableWidgetItem after created but i get segmentation faults when retrieving the currentItem from a QTableWidget like this
aList->setItem(aList->rowCount()-2,
1,
new QTableWidgetItem(tr("TOTAL :: ")));
aList->currentItem()->setForeground(QBrush(Qt::darkRed));
why i can't use the QTWI returned by currentItem()? is there any way to do what im pretending the short way instead of creating the QTWI pointer and defining it before calling setItem()?
thanks
aList->setItem(aList->rowCount()-2,
1,
new QTableWidgetItem(tr("TOTAL :: ")));
aList->currentItem()->setForeground(QBrush(Qt::darkRed));
why i can't use the QTWI returned by currentItem()? is there any way to do what im pretending the short way instead of creating the QTWI pointer and defining it before calling setItem()?
thanks