PDA

View Full Version : scaling all contents of a QTableView



JoZCaVaLLo
9th March 2012, 16:47
Hello... does anybody have a hint about how to scale all the contents of a QTableView? (Cells and headers)...

In I tried the following, but this works only on the cells... headers are not scaled and also, viewport is not working properly...



void MyDelegate::paint (QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const
{
QTransform trans;
trans.scale(1.25, 1.25);
painter->setTransform(trans);

QStyledItemDelegate::paint(painter, option, index);
}


Any example or hint would be really appreciated.