QGroupBox qss code
时间: 2023-10-16 10:08:25 浏览: 98
Here is an example of QGroupBox QSS code:
```
QGroupBox {
border: 2px solid gray;
border-radius: 5px;
margin-top: 10px;
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
padding: 0 10px;
font-weight: bold;
}
QGroupBox::indicator {
width: 20px;
height: 20px;
}
QGroupBox::indicator:checked {
image: url(checked.png);
}
QGroupBox::indicator:unchecked {
image: url(unchecked.png);
}
```
This code sets the border, border radius, and margin for the QGroupBox. It also styles the title by setting the padding and font weight. The QGroupBox indicator is styled with a width and height, and different images are used for when it is checked or unchecked.
阅读全文