Hi,
How can I add small variable space within a column in a grid layout?
(as in sub-bullets in MS office).
I have 5 QCheckBoxes. 3,4,5 are sub boxes of 2.
Please look at the attached picture(1pic.jpg).
Printable View
Hi,
How can I add small variable space within a column in a grid layout?
(as in sub-bullets in MS office).
I have 5 QCheckBoxes. 3,4,5 are sub boxes of 2.
Please look at the attached picture(1pic.jpg).
Try to use QSpacerItem.
I tried it. But I could not achieve the desired result. Following is the sample code:
Code:
MyGroupBox->setLayout(MyGridLayout); OutputLayout->addWidget(Chek1,1,0); OutputLayout->addWidget(Chek2,2,0); OutputLayout->addWidget(Chek3,3,0); // space required before this checkbox OutputLayout->addWidget(Chek4,4,0); //space required before this checkbox MySubLayout->addWidget(MyGroupBox);
Please indicate how can I add space as illustrated in the 1pic.jpg. Thanks
@Spirit: could u plz indicate where can I insert QSpacerItem in the above lines to get the desired result as shown in the pic?