1) Probably that’s the default QT placement, in the first image the
platform style is used, and its take care of borders and title placement, when
you change the stylesheet you override something and you get the ugly
placement.
2) You can control the “title” position using the
QGroupBox:title
controls, for example:
gb.setStyleSheet('QGroupBox:title {' 'subcontrol-origin: margin;' 'subcontrol-position: top center;' 'padding-left: 10px;' 'padding-right: 10px; }')will result in something like this:
3) My suggestion is to create different strings for the stylesheet
attributes you want to change, then compose them to create the style you
want.



