QicsCellItem *ci = cellItem(i, j);if (ci) { p.setPen(ci->colorForeGround); p.setBrush(ci->colorBackGround);} else { p.setPen(Qt::black); p.setBrush(Qt::white);}p.drawRect(r);QVariant v = data(row, col, i, j);if (v.isValid()) { p.drawText(r, Qt::AlignCenter, v.toString());}
p.setPen(Qt::black);p.setBrush(Qt::white); p.drawRect(event->rect());