Important: Please read the Qt Code of Conduct -

QPushButton over OpenGL

  • Hi,

    I am developing a Windows based GUI application. The main window on the application is a split screen with the input from a camera on one side and a map display on the other side. Then I have a row of buttons along the top of the window. The tool that displays the map automatically uses OpenGL. The other side uses QCamera and is not using OpenGL. My complication is that the buttons over the map half look different than the ones over the camera half.

    If I use the standard QPushButton the buttons over the OpenGL half have a black border. The others don't. One button in the middle that is half over the OpenGL side and half over the camera side has a black border over just the OpenGL part. If I try to make the button flat or put ANY style details on the buttons those over the OpenGL side just turn solid black. Also I wanted to use icons with transparent backgrounds as buttons but the background over the OpenGL side is black.

    At this point I just want buttons that look the same across the window. What do I have to do to fix this?

  • Hi gpuckett54, you said that it didn't work when changing style details. But just to be sure, have you tried with stylesheets?

  • That is what I meant. If I add any stylesheet information the button goes black on the OpenGL side. I've tried changing the background color and adding a border.

Log in to reply