This would suggest you are dealing with a list of blocks which would suggest QListView or QListWidget to be an ideal solution to your problem. Of course you have to provide a custom delegate for selecting text (unless you're not interested in selecting part of a single block but rather whole block at a time).
Bookmarks