How to make a QCheckBox box is bigger?



  • Greetings.

    I'm using a QCheckBox in my application, but I think the box is very small.
    How I can make the box is bigger?

    Thanks in advance for any help and/or suggestions.



  • Hi, you may use styleSheet and the ::indicator subcontrol to assign your own .png for all states of QCheckBox



  • I believe indicator is the checkmark, not the box itself.
    I think (though I haven't tried it) that setIcon() will change the box.



  • Though it sounds like the checkmark, it's the box itself:
    @
    QRadioButton {
    spacing: 5px;
    }
    QRadioButton::indicator {
    width: 13px;
    height: 13px;
    }
    QRadioButton::indicator:unchecked {
    image: url(:/style/radioNcheck.png);
    }
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.