Show content of KsTraceViewer table in monospaced font. When using function_graph tracer, its C-style indentation of traced functions is now shown correctly. Use system font, so the font used in the table can still can be configured via window manager, same as the fonts in title and menus. The font in the horizontal header of the table stays regular non-monospaced as before. Tested on KDE Plasma 5.25.4, Qt 5.15.4. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216404 Signed-off-by: Andrej Stender <andrej.stender@xxxxxxxxxxxxxxxx> --- src/KsTraceViewer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/KsTraceViewer.cpp b/src/KsTraceViewer.cpp index afd5a859de72..be0a41941db2 100644 --- a/src/KsTraceViewer.cpp +++ b/src/KsTraceViewer.cpp @@ -129,6 +129,9 @@ KsTraceViewer::KsTraceViewer(QWidget *parent) _view.setSelectionBehavior(QAbstractItemView::SelectRows); _view.setSelectionMode(QAbstractItemView::SingleSelection); _view.verticalHeader()->setDefaultSectionSize(FONT_HEIGHT * 1.25); + _view.setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); + _view.horizontalHeader()->setFont( + QFontDatabase::systemFont(QFontDatabase::GeneralFont)); _proxyModel.setSource(&_model); _view.setModel(&_proxyModel); -- 2.20.1