Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to make a QCheckBox box is bigger?
Qt 6.11 is out! See what's new in the release blog

How to make a QCheckBox box is bigger?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    isaacEnrique
    wrote on last edited by
    #1

    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.

    Isaac Pérez
    Programming is understanding.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      clochydd
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • S Offline
        S Offline
        ScottR
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • C Offline
          C Offline
          clochydd
          wrote on last edited by
          #4

          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);
          }
          @

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved