using ktexteditor as a base for a disassembly viewer

Milian Wolff mail at
Fri Dec 11 14:46:18 GMT 2020

Hey all,

I'm wondering what to use for hotspot to show a disassembly view. Basically 
this view consists of multiple columns:

- address
- instructions
- costs (cycles, instructions, branch misses, whatever...)

Initially I thought: Let's use a read-only ktexteditor part for this, as it 
will get us highlighting and copy'n'paste features for free. But we'd have to 
put the costs into ktexteditor annotations then, I guess?

So I'm not so sure whether that's a good fit after all: While we get some 
features for free, we lose others, such as reordering of columns and selection 
of more.

What would you use to build something like this:

Ideally, we would even eventually get the ability to show the source code too, 
like here:

But I have to say that instead of the mixed view above, I much prefer 
godbolt's view:

So, any input and suggestions would be welcome on how to tackle this.

PS: How would one even use KSyntaxHighlighting for rendering into a 
QAbstractItemView? That also sounds somewhat nasty hmmm
Milian Wolff
mail at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the KWrite-Devel mailing list