0

I have added a HTMLDelegate to a QTreeView instance I'm tinkering with (see How to make item view render rich (html) text in Qt), so I can present its contents with rather simple rich text (HTML). The hits are presented as

<headerstyle>result type</headerstyle><br>&nbsp;
%d results of this type

where "headerstyle" is either a single tag (say ) or a combination of such tags.

That I'd like is to add underlining to the 1st line that spans the entire width of the QTreeView. Checking existing suggestions on here make it seem doubtful that this will be possible, but maybe I'm overlooking something?

I tried adding <span style="border-bottom: 1px solid"> but no borders are ever drawn. That may be a limitation in the HTMLDelegate, but it probably wouldn't work anyway. does work but only applies to the actual text, not the entire first line. I guess what I'd need is a right-aligning tab character...?

Current actual code: https://github.com/RJVB/audacious-plugins/blob/RJVB-MP-Qt/src/search-tool-qt/search-tool-qt.cc#L166

RJVB
  • 698
  • 8
  • 18
  • 1
    show your code. HTMLDelegate is not standard – eyllanesc Jan 25 '18 at 14:05
  • Sorry, forgot to add the link to the SO article. Added a link to the actual code I'm working with since the project's main author refactored my implementation. – RJVB Jan 25 '18 at 18:25

0 Answers0