QGroupBox::title positioning
-
Hello,
I'm setting this stylesheet on QGroupBox:
@QGroupBox {
border: 1px solid rgb(100, 100, 100);
border-radius: 3px;
margin-top: 8px;
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
}@and my title is in the upper-left corner. So, how do I move it a little to the right? The trick here is to keep the groupbox top-left corner drawn.
-
Oh!.. It was simple. The answer is to use "left" property like this:
@QGroupBox::title {
...
left: 15px;
}@ -
Hi,
You can try using the "alignment property":http://qt-project.org/doc/qt-5.1/qtwidgets/qgroupbox.html#alignment-prop
Hope it helps