PDA

View Full Version : Increase the size of radio buttons



arunvv
22nd January 2009, 23:23
Hi All,

I want to increase the radiobutton size, or change the color to solid color(Like black, red etc). Just the radiobutton circle, not background rectangle box. How can do it?

Thanks & Regards,
Arun.

wysota
23rd January 2009, 00:18
Start by taking a look at style sheets reference.

arunvv
23rd January 2009, 01:51
I looked the stylesheets but I don't know how to set color for radio button circle.
I was able to change colors for indicator and background. But I want to change the color for radiobutton circle. What attribute I need to use for coloring only circle of a radiobutton.

Thanks & Regards,
Arun

wysota
23rd January 2009, 10:08
I'm not sure what is the difference between "indicator" and "circle". Could you explain? Remember you can always substitute the button's indicator with your own image.

arunvv
23rd January 2009, 18:22
The border of circle is not so bright/visible properly, that is why I want to change the color of border of radio button. When i try to change the border of a radio button, it changes the rectangular border, not the circle border. So I want to make the border of the circle more brighter than it is now by changing it's color. So how can i change it?

Thanks & Regards,
Arun

swamyonline
23rd January 2009, 19:44
hi,
if u r trying to change the color of the circle of the radio button here is the solution:


// To set RED Color
QPalette redTextPalette.setBrush(QPalette::Active,QPalette: :Text, QBrush(Qt::red));
QRadioButton *rButton = new QRadioButton();
rButton->setPalette(redTextPalette);


but if u r trying to increase the size of the circle of the radio button, sorry, I also tried but could not find a solution. if u find any solution, pls let me know. by the way, if u r trying to use radio button as an indicator, why dont u try QLed widget. its very good one to represent indicators and u can change size and color of it very easily. QLed widget is available on www.qt-apps.org in widgets section.. bye

swamy

codeslicer
24th January 2009, 00:26
I don't think you can make it larger because the operating system probably does not support. However, you might be able to make a custom "skin" and make your own radio button with your own images.

wysota
24th January 2009, 01:09
Maybe setting a global strut would help? I'm pretty convinced it won't work on windows xp/vista and macosx styles, but for others it should be sufficient.