Access Border
-
Hello, i am trying to build an mp3 player using pyqt.
I have a couple of QHBoxLayouts and QVBoxLayouts inside of a QWidget. (The outer most widget is a QWidget so that I can set a stylesheet and change the background color). I tried to have the top and the bottom frame in a different color. This all worked out, but as you can see in the picture, there is a border around my pink topframe and my red bottomframe. I am now wondering why this border is there and how i can access or even better remove it.
-
Assuming that a QVboxLayout contains the top and bottom frame you want to look at QLayout::setSpacing()
-
Yes, you are completely right my QVBoxLayout that holds them is called MainLayout. But calling self.MainLayout.setSpacing(0) doesn't do anything. I am not sure if I understood the documentary correctly though, this might not be the right way to call this method. Anyways, i got it to work with the .setContentsMargin(0,0,0,0) method, for anyone who might have the same issue. Thanks a lot for the quick help!