enabled antialiasing for Layouts::HeaderView

pull/12/head
Michail Vourlakos 5 years ago
parent 7613396708
commit b63c7bfbc7

@ -41,6 +41,8 @@ HeaderView::HeaderView(Qt::Orientation orientation, QWidget *parent)
void HeaderView::paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const void HeaderView::paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const
{ {
painter->setRenderHint(QPainter::Antialiasing, true);
if (logicalIndex == Model::Layouts::BACKGROUNDCOLUMN) { if (logicalIndex == Model::Layouts::BACKGROUNDCOLUMN) {
QString text = model()->headerData(Model::Layouts::BACKGROUNDCOLUMN, Qt::Horizontal, Qt::DisplayRole).toString(); QString text = model()->headerData(Model::Layouts::BACKGROUNDCOLUMN, Qt::Horizontal, Qt::DisplayRole).toString();
QIcon icon = model()->headerData(Model::Layouts::BACKGROUNDCOLUMN, Qt::Horizontal, Qt::DecorationRole).value<QIcon>(); QIcon icon = model()->headerData(Model::Layouts::BACKGROUNDCOLUMN, Qt::Horizontal, Qt::DecorationRole).value<QIcon>();

Loading…
Cancel
Save