I want to achieve this :
I made a widget and achieved to make it transparent like this :
window.setAttribute( Qt::WA_TranslucentBackground);
window.setWindowFlags (Qt::FramelessWindowHint);
window.setGeometry( 0,0,1200, 800 );
window.show();
Then I overrode the function paintEvent(QPaintEvent *); to make a ellipse using QPainter.
But still the surface is coming to be black color only. Can someone explain ?
Looks similar to what I did in a similar app, but I also did:
window.setAutoFillBackground(false);
Perhaps that's the missing piece for you?
Edit: Another idea: In your paintEvent
, do you fill the widget rect()
with a fully transparent color before you paint the ellipse?