What if you do this ?
{
int nIndex = 0;
// whatever you do with nIndex
// you incremented it by 1, we'll do the same
nIndex++;
QLable *lblNo = new QLable(frame1);
lblNo->setAlignment(Qt::AlignCenter);
lblNo
->setText
(QString::number(nIndex
));
tblwdgt->setCellWidget(row, 0, lblNo);
}
{
int nIndex = 0;
// whatever you do with nIndex
// you incremented it by 1, we'll do the same
nIndex++;
QLable *lblNo = new QLable(frame1);
lblNo->setAlignment(Qt::AlignCenter);
lblNo->setText(QString::number(nIndex));
tblwdgt->setCellWidget(row, 0, lblNo);
}
To copy to clipboard, switch view to plain text mode
Bookmarks