Hacker News new | ask | show | jobs
by _camm 912 days ago
QTextDocument is a class in Qt::Gui that many of the other text classes/components use. I was thinking you may have implemented your own text handling widget/item, but using delegates of text areas makes sense too.

I will try reuseItems again. It's something I tried before briefly but thought it may have been causing some rendering glitches and removed it. Maybe because I didn't implement onResused or onPooled properly. Thanks!

1 comments

> I was thinking you may have implemented your own text handling

Yes, but without QTextDocument as I had some problems with it. I had to implement my own undo/redo/copy/paste/etc.

> It's something I tried before briefly but thought it may have been causing some rendering glitches

Yes, I've experienced some (minor) glitches that I've yet to figure out how to fix. For example, the cursor seems to (sometimes) jump when creating new blocks. Sometimes delegates reappear with animation (while I turned them off when onPooled ran). I'm trying to figure out if I'm doing something incorrectly (highly probable) yet I don't get these issues without reuseItems.

Sure, I hope it works out well for you (: