manaila
16th February 2012, 07:49
I have a QGroupBox of radio buttons. I have added the buttons to the horizontal layout in the group box using:
layout->addWidget(RadioButton1, 0, Qt::AlignHCenter); so they are centered in the group box. I have also made the groupbox title to be centered.
Unfortunately, it appears that the radio button AND its corresponding text are centered and this makes them to be not properly formated vertically when the button texts are of different string lengths. I had to add some empty spaces after the text in order to adjust its size so it is aligned vertically with other buttons, but this seems to be very inconvenient.
Also the the group box does not get centered and the borders not shown.
I'm using Ubuntu 11.04; on Windows the borders are shown with the title centered.
Can anyone help me with the problems I am having.
layout->addWidget(RadioButton1, 0, Qt::AlignHCenter); so they are centered in the group box. I have also made the groupbox title to be centered.
Unfortunately, it appears that the radio button AND its corresponding text are centered and this makes them to be not properly formated vertically when the button texts are of different string lengths. I had to add some empty spaces after the text in order to adjust its size so it is aligned vertically with other buttons, but this seems to be very inconvenient.
Also the the group box does not get centered and the borders not shown.
I'm using Ubuntu 11.04; on Windows the borders are shown with the title centered.
Can anyone help me with the problems I am having.