SetWindowFlag (Qt :: Dialog | Qt :: WindowStaysOnTopHint) doesn't work in Centos

I open a form window and want to always stay on it, no matter focused or not, I use this setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint)

QT function , it works fine on Mac as I want, but when I use the same function on centos it doesn't work correctly and the window hides when not focused

+3


source to share


1 answer


I solved this problem simply by adding another flag to the function



setWindowFlags (Qt :: Dialog | Qt :: WindowStaysOnTopHint | Qt :: X11BypassWindowManagerHint)

+1


source







All Articles