Skip to content

RFC: Use QApplication::font with respective widget class

Kai Uwe Broulik requested to merge work/kbroulik/classname-font into master

Ensures it picks the right font, for example QHeaderView for tab bar headers.


Screenshot_20220712_182615

Didn't really do much testing beyond the tab bar. There could be funky side-effects.

Also doesn't influence the size of the header, unfortunately, despite already having in initStyleOption

const QFont font = qApp->font("QHeaderView");
        opt->fontMetrics = QFontMetrics(font);

@ahiemstra @cblack @mart

Edited by Kai Uwe Broulik

Merge request reports