Remove QGroupBox Space
-
wrote on 24 May 2014, 14:43 last edited by
How can i remove QGroupbox space
i already test
@groupbox->setStyleSheet("QGroupBox::title { border: 0px ; border-radius: 0px; padding: 0px 0px 0px 0px; margin = 0px 0px 0px 0px } QGroupBox { border: 0px ; border-radius: 0px; padding: 0px 0px 0px 0px;} ");
@
it reduce the space but not perfectly done!
how can i remove space completely
u can c a few space and margin in second radio group but not in first in follow image
!http://axgig.com/images/42241377009986391810.png(screenshot)!thanks
-
wrote on 24 May 2014, 17:12 last edited by
Where is a groupBox on the picture? Is it whole picture?
What space do you need to remove? Point it on the picture please.
How do you create the groupBox? Do you use layouts? -
wrote on 24 May 2014, 17:45 last edited by
in follow picture i located the groupbox with gray rectangle
the above radioboxes are without groupbox and only layout used!http://axgig.com/images/30296945634705783323.jpg(as)!
i'm trying to tag radiobox so each of four work independtly
if there is any other way to do so i appreciate it -
wrote on 24 May 2014, 18:33 last edited by
Try to set attribute Qt::WA_LayoutOnEntireRect on your groupbox.
-
wrote on 29 May 2014, 18:59 last edited by
thanks for reply but it doesn't change any thing
-
wrote on 29 May 2014, 19:31 last edited by
I don't understand what space do you need to remove.
Is it the space between each radiobutton?Right now it looks like this:
@
|o null |o null |o null |o null |
@Are you trying to put them close to each other like this:
@
|o null |o null |o null |o null |
@If so, then you can create a horizontal layout put all groupboxes together and add horizontal spacer to fill rest of the place.
If it is not what you need then, please, draw a picture of your desired design.
-
wrote on 29 May 2014, 21:00 last edited by
Hi,
did you try this:
@
group->setVisible(false); //that code will hide the QGroupBox widget
@about the radioboxes, create them with the same parent, so they will work dependently
try something like this:
@
QHBoxLayout *ly = new QHBoxLayout;
QGroupBox *group = new QGroupBox("Countries");
QWidget *widget = new QWidget;QRadioBox *r1 = new QRadioBox(tr("Ivory coast"),widget);
QRadioBox *r2= new QRadioBox(tr("Germany"),widget);
QRadioBox *r3 = new QRadioBox(tr("USA"),widget);
ly->addWidget(r1);
ly->addWidget(r2);
ly->addWidget(r3);
group->setLayout(ly);
//and other code
@
1/7