I am using the QSFML repo to use sfml 2.x inside a Qt 6.x widget.
I cound not find a way to make the sfml background transparent to see classic qt widgets behind the sfml widget (whatever I try the SMFL background stay black).
Is this possible ? If it’s not I would very much appreciate an explaination (is it because of openGL limitations ?)
This is what I tryed :
setStyleSheet("* { background-color: transparent;}");
in qsfml widget and parent widget.
clear(sf::Color::Transparent);
inside OnUpdate() function of qsfml widget.
Setting a background sprite with alpha channel in qsml widget.
Setting attributes like :
w->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
w->setAttribute(Qt::WA_NoSystemBackground);
w->setAttribute(Qt::WA_TranslucentBackground);
w->setAttribute(Qt::WA_PaintOnScreen);
w->setAttribute(Qt::WA_TransparentForMouseEvents);