Results 1 to 8 of 8

Thread: Increase the size of radio buttons

  1. #1
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Increase the size of radio buttons

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Increase the size of radio buttons

    Start by taking a look at style sheets reference.

  3. #3
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Increase the size of radio buttons

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Increase the size of radio buttons

    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.

  5. #5
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Increase the size of radio buttons

    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

  6. #6
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    10
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Increase the size of radio buttons

    hi,
    if u r trying to change the color of the circle of the radio button here is the solution:

    Qt Code:
    1. // To set RED Color
    2. QPalette redTextPalette.setBrush(QPalette::Active,QPalette::Text, QBrush(Qt::red));
    3. QRadioButton *rButton = new QRadioButton();
    4. rButton->setPalette(redTextPalette);
    To copy to clipboard, switch view to plain text mode 

    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
    Last edited by swamyonline; 23rd January 2009 at 19:51. Reason: not a proper variable name

  7. #7
    Join Date
    Feb 2008
    Posts
    153
    Thanks
    40
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Increase the size of radio buttons

    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.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Increase the size of radio buttons

    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.

Similar Threads

  1. Radio buttons in a tree view
    By notwithstanding in forum Qt Programming
    Replies: 6
    Last Post: 3rd November 2008, 23:32
  2. Programatically setting radio buttons
    By Doug Broadwell in forum Newbie
    Replies: 2
    Last Post: 25th May 2007, 21:55
  3. array of radio buttons
    By amulya in forum Qt Programming
    Replies: 4
    Last Post: 5th October 2006, 13:59
  4. How to get larger radio buttons on XP?
    By Ben.Hines in forum Qt Programming
    Replies: 9
    Last Post: 24th April 2006, 20:00
  5. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 23:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.