-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
4.8.5
-
None
-
windows
Returning empty font for Qt::FontRole from Model::headerData() is causing header view to clip letter, g p q etc.
If we return empty QVariant()it works good.
Attached address book example reproduces this.
I have simply replaced the headerData()of tableModel to see the issue.
by the way following code does work good
QFont fs; fs.setBold(true); QFont fs2 = qApp->font(); fs2.setBold(true); QVariant v = QVariant::fromValue(fs); QVariant v2 = QVariant::fromValue(fs2); QFontMetrics fm(qvariant_cast<QFont>(v)); QFontMetrics fm2(qvariant_cast<QFont>(v2)); qDebug() << (qvariant_cast<QFont>(v) == qvariant_cast<QFont>(v2)) << (fm.size(0, "gggg") == fm2.size(0, "gggg"));