PDA

View Full Version : QRadiButton and QCheckBox Indicator Box Sizing Issue.



savaliya_ambani
7th June 2011, 11:45
Hi, All

I am struggling for changing the style of QRadiobutton and QCheckbox, though both are same in a styesheet point of view.

I have used following for the QCheckBox:
mycheckbox->setStyleSheet("QCheckBox::indicator { width: 13px; height: 13px; };");

Indicator Size gets changed, But Click symbol remains in the left corner, how can i set it in center.

For QRadioButton i have done the same thing , but its not working.
myradiobuton->setStyleSheet("QRadioButton ::indicator { width: 13px; height: 13px; };");

Size itself not changing. I dont why ?

can some one show me the way?

savaliya_ambani
10th June 2011, 04:59
Hello,

I am struggling with this a lot. While Applying style sheet there is no error,
But i dont know why rediobutton is not getting bigger.

Santosh Reddy
10th June 2011, 06:24
Can you post the screenshot, both radio, and checkbox?

savaliya_ambani
13th June 2011, 11:00
My code is like this.

radioButton = new QRadioButton(parent);
radioButton->setStyleSheet("QRadioButton::indicator{width:25px; height:25px};");

checkBox= new QCheckBox(parent);
checkBox->setStyleSheet("QCheckBox::indicator{width:25px; height:25px};");

Both are using the same stylesheet and code. But radioButton can't be resized ,but checkbox.

I Have 4 PC. Each is using Qt:4.6.2, The same problem occurs in each PC.
i suspect a bug around this thing.

Sang_Kim
27th August 2011, 00:56
Same thing happens to me.
The QCheckBox indicator can be resized.. but not the QRadioButton