How to ingore specific image copy in QTextBrowser?
I have a
ChatViewwidget based on
QTextBrowser, where I put two image anchors to achieve click event. I want copy and paste action to ignore these two items. How can I achieve it?
select and copy:
paste to a widget based on
what I want to achieve without any extra editor action:
Maybe you can reimplement the Clipboard of aplication to ignore these imagens (removing them of plain text).
But also, you can reimplement the paste action of QTextBrowser class and remove these image of plaintext.
Either you recreate the whole mime-data yourself or you call the base-class implementation and remove the <img> elements from the text/html data.
Actually you can also completely create your own mime-type and store anything you like in there. Then reimplement
insertFromMimeData()and handle your custom mime-type.