Transparent TextBrowser

Hello everyone, I got a tricky question. I am pretty new to pyqt5.
I build an object detection and everytime something gets detected i append a text to an textbrowser widget.

How I want that the last append appears with higher transparency than the apended text before.
Any idea how to achieve that?
Thanks in advance

When you say transparency, do you mean in a lighter colour, or is your text box actually transparent? Normally, the back of windows in Qt are filled in (although you can turn this off!)

If you’re using QTextEdit you can use .setTextColor to set the color of the text, although for the effect you’re after you’d have to reset the previous line back to the normal color too.

What I think I would do instead, is use a QListView (see model views Using the PyQt5 ModelView Architecture to build a simple Todo app ) and apply conditional formatting to the last element in the list. That way the appeance will be handled automatically.

I want to generate a fading out Effekt with the already appended text.