Results 1 to 5 of 5

Thread: QRadiButton and QCheckBox Indicator Box Sizing Issue.

  1. #1
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default QRadiButton and QCheckBox Indicator Box Sizing Issue.

    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?

  2. #2
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QRadiButton and QCheckBox Indicator Box Sizing Issue.

    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.

  3. #3
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QRadiButton and QCheckBox Indicator Box Sizing Issue.

    Can you post the screenshot, both radio, and checkbox?

  4. #4
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QRadiButton and QCheckBox Indicator Box Sizing Issue.

    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.

  5. #5
    Join Date
    Aug 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QRadiButton and QCheckBox Indicator Box Sizing Issue.

    Same thing happens to me.
    The QCheckBox indicator can be resized.. but not the QRadioButton

Similar Threads

  1. QScrollArea Sizing
    By LIRiot in forum Newbie
    Replies: 10
    Last Post: 27th October 2010, 13:37
  2. QHeaderView Sort Indicator sizing
    By vycke in forum Qt Programming
    Replies: 3
    Last Post: 1st October 2009, 14:53
  3. Sizing problem
    By Levon Nikoghosyan in forum Qt Programming
    Replies: 7
    Last Post: 2nd April 2007, 17:31
  4. sizing question
    By jlgerber in forum Newbie
    Replies: 1
    Last Post: 20th November 2006, 16:48
  5. Sizing Issues
    By Solarity in forum Newbie
    Replies: 7
    Last Post: 13th February 2006, 19:17

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.