'How to set border and separating line and background in Pyqt5

enter image description here

I have a QDialog window. There is such a layout with different styles of lines and background in the image(This is set up in Excel). I tried Qframe, Qgroupbox, Qgridlayout, But I cann't get it. What should I do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source