Is QDataGridColumn what you are looking for? You can set CSS like this for a column:
$this->colId = new QDataGridColumn('Id', '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Category()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Category()->Id, false)));
$this->colId->CssClass = 'myIdClass';
If you are only looking to set the class on the header row, you will need a condition for that cell.