I have a Qt application and in one window inside QScrollArea and verticalLayout there is a QGroupBox with this css:

#groupBox { background-color: transparent; border-color: black; border-width: 1 px; border-style: solid; margin: 5px; } 

Instead of the expected result, I get this: enter image description here

I can put up with the top space in the border, it does not matter. But where are the side boundaries? Increasing padding / marging padding works, but does not fix the problem, like limiting the maximum width of GroupBox.

  • html in the studio, most likely the whole text needs to be enveloped in a separate div and give this div Border, and then, with the help of the padings, this diva pushes the text - Lieutenant Jim Dangle
  • The source is autogenerated in xml Qt Designer. But the problem has already been solved - Matty

1 answer 1

What is the point is not clear, but replacing three lines with one line works as it should:

 border: 1px solid black;