void DateTimeEditDelegate::paint( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const { QStyleOptionViewItem opt = option; QString text = index.data().toString(); //Pseudokod if (text.contains("blah-blah")) { text = " "; } drawDisplay(painter, opt, opt.rect, text); drawFocus(painter, opt, opt.rect);}