This thought crossed my mind too, but I didn't want to over-complicate it, so I came up with a workaround. I added the message frame in my "MyCustomTabWidget" above the QWebView (that is visible on the screenshot) and hid it. Then, whenever I need to display a message, I set the text and un-hide the QFrame. This brings the QWebView down and my message widget is displayed at the top, which works perfectly for me. When the OK button is pressed, the message frame is set to hidden again and everything comes into place.
Here is how it looks now:
Attachment 8666
I used a label with lightblue background color to make a kind of title for my message box. It still needs a little visual refinement, but the important thing is that it does what I want.
Thank you both for your assistance.