Qt 6.11 is out! See what's new in the release
blog
there are some QCheckBox in 1 column, how to make the 2nd line QCheckBox Indent in order to make it look like the child of the 1st line one?
General and Desktop
5
Posts
2
Posters
1.9k
Views
2
Watching
-
in what widget ? QColumnView ?
How did you insert the first checkbox ? -
@opengpu2
Ahh, that way.You could insert a widget as placeholder for the checkbox and use setContentsMargins "indent" it as you desire.
QWidget * w = new QWidget(); w->setLayout ( new QVBoxLayout() ); QCheckBox *chk = new QCheckBox ( "abcd" ); w->layout()->addWidget ( chk ); w->layout()->setContentsMargins(20,9,9,9); ui->groupBox->layout()->addWidget ( w ); -
@opengpu2
Ahh, that way.You could insert a widget as placeholder for the checkbox and use setContentsMargins "indent" it as you desire.
QWidget * w = new QWidget(); w->setLayout ( new QVBoxLayout() ); QCheckBox *chk = new QCheckBox ( "abcd" ); w->layout()->addWidget ( chk ); w->layout()->setContentsMargins(20,9,9,9); ui->groupBox->layout()->addWidget ( w );