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. Green QCheckBox
Forum Update on Monday, May 27th 2025

Green QCheckBox

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 5 Posters 2.1k Views
  • 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.
  • A abarmotov
    25 Oct 2018, 14:14

    Is there no way without images, just backcolor ?
    Ugh, subclass for resizing and replace QCheckBox for QMyCheckBox in whole code - not so good )

    Can it be done with QApplication::setStyle ? Start my digging that way ?

    J Offline
    J Offline
    JonB
    wrote on 25 Oct 2018, 14:57 last edited by JonB
    #4

    @abarmotov said in Green QCheckBox:

    Ugh, subclass for resizing and replace QCheckBox for QMyCheckBox in whole code - not so good )

    Just a heads-up: next time you start out on a project, sub-class every Qt widget before you get going/use it first time. That's what I have done, and it sure helps :)

    1 Reply Last reply
    1
    • A abarmotov
      25 Oct 2018, 12:14

      Hello !

      In last 1810 ubuntu green gnome checkboxes is cool, I want same in QCheckBox )

      Tried with "QCheckBox::indicator:checked { width:100px;height: 100px; background-color: #12ff12; }", but dont work;
      Is it possible do this with styles and without stylesheets ?
      Also want width and height of square is automatic resized from font size, is it possible ?

      J Offline
      J Offline
      JonB
      wrote on 25 Oct 2018, 15:05 last edited by
      #5

      @abarmotov said in Green QCheckBox:

      Tried with "QCheckBox::indicator:checked { width:100px;height: 100px; background-color: #12ff12; }", but dont work;

      What exactly "dont work"? Can only guess no change, same old color? Did you try adding: border: none; ?

      A 1 Reply Last reply 26 Oct 2018, 06:16
      1
      • J JonB
        25 Oct 2018, 15:05

        @abarmotov said in Green QCheckBox:

        Tried with "QCheckBox::indicator:checked { width:100px;height: 100px; background-color: #12ff12; }", but dont work;

        What exactly "dont work"? Can only guess no change, same old color? Did you try adding: border: none; ?

        A Offline
        A Offline
        abarmotov
        wrote on 26 Oct 2018, 06:16 last edited by abarmotov
        #6

        @JonB said in Green QCheckBox:

        What exactly "dont work"? Can only guess no change, same old color? Did you try adding: border: none; ?

        Sorry, forget to show. http://tinypic.com/r/161jmft/9
        On this picture QCheckBox is set checked state and applied that style.

        J 1 Reply Last reply 26 Oct 2018, 06:53
        0
        • A abarmotov
          26 Oct 2018, 06:16

          @JonB said in Green QCheckBox:

          What exactly "dont work"? Can only guess no change, same old color? Did you try adding: border: none; ?

          Sorry, forget to show. http://tinypic.com/r/161jmft/9
          On this picture QCheckBox is set checked state and applied that style.

          J Offline
          J Offline
          JonB
          wrote on 26 Oct 2018, 06:53 last edited by
          #7

          @abarmotov
          Yes, that's what I get. Were you expecting something different?

          A 1 Reply Last reply 26 Oct 2018, 07:23
          1
          • J JonB
            26 Oct 2018, 06:53

            @abarmotov
            Yes, that's what I get. Were you expecting something different?

            A Offline
            A Offline
            abarmotov
            wrote on 26 Oct 2018, 07:23 last edited by
            #8

            @JonB said in Green QCheckBox:

            @abarmotov
            Yes, that's what I get. Were you expecting something different?

            I expecting BLACK mark on green background
            If my style sheet is wrong - how to write correct one ?
            I just want to change background color, not mark, not anything else.

            J 1 Reply Last reply 26 Oct 2018, 07:25
            0
            • A abarmotov
              26 Oct 2018, 07:23

              @JonB said in Green QCheckBox:

              @abarmotov
              Yes, that's what I get. Were you expecting something different?

              I expecting BLACK mark on green background
              If my style sheet is wrong - how to write correct one ?
              I just want to change background color, not mark, not anything else.

              J Offline
              J Offline
              JonB
              wrote on 26 Oct 2018, 07:25 last edited by
              #9

              @abarmotov
              Sorry, I don't know. But if you're saying you want something like whatever it is you have in Ubuntu 18.10, why don't you paste a shot so that readers can see?

              A 1 Reply Last reply 26 Oct 2018, 07:39
              0
              • J JonB
                26 Oct 2018, 07:25

                @abarmotov
                Sorry, I don't know. But if you're saying you want something like whatever it is you have in Ubuntu 18.10, why don't you paste a shot so that readers can see?

                A Offline
                A Offline
                abarmotov
                wrote on 26 Oct 2018, 07:39 last edited by
                #10

                @JonB said in Green QCheckBox:

                @abarmotov
                Sorry, I don't know. But if you're saying you want something like whatever it is you have in Ubuntu 18.10, why don't you paste a shot so that readers can see?

                Sorry again, i thing all have ubuntu )))
                http://tinypic.com/view.php?pic=1zptbts&s=9

                J J 2 Replies Last reply 26 Oct 2018, 07:58
                0
                • A abarmotov
                  26 Oct 2018, 07:39

                  @JonB said in Green QCheckBox:

                  @abarmotov
                  Sorry, I don't know. But if you're saying you want something like whatever it is you have in Ubuntu 18.10, why don't you paste a shot so that readers can see?

                  Sorry again, i thing all have ubuntu )))
                  http://tinypic.com/view.php?pic=1zptbts&s=9

                  J Offline
                  J Offline
                  JonB
                  wrote on 26 Oct 2018, 07:58 last edited by
                  #11

                  @abarmotov
                  I just upgraded to Ubuntu 18.04 (GNOME desktop) yesterday. Everything of mine is default. I don't get green, but I do get orange, so you must have changed theme or something?

                  Assuming it's a "theme" thing, might be problematic?

                  Anyway, now that you have shown what you want it to look like, other experts here may be able to tell you how to achieve in Qt....

                  A 1 Reply Last reply 26 Oct 2018, 08:07
                  0
                  • A abarmotov
                    26 Oct 2018, 07:39

                    @JonB said in Green QCheckBox:

                    @abarmotov
                    Sorry, I don't know. But if you're saying you want something like whatever it is you have in Ubuntu 18.10, why don't you paste a shot so that readers can see?

                    Sorry again, i thing all have ubuntu )))
                    http://tinypic.com/view.php?pic=1zptbts&s=9

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 26 Oct 2018, 08:07 last edited by
                    #12

                    @abarmotov said in Green QCheckBox:

                    i thing all have ubuntu

                    For sure not :-) Linux != Ubuntu
                    There are many different Linux distributions and not everyone is actually using Linux.
                    And even Ubuntu users not always use latest version and not all are using the standard desktop (I use Xubuntu LTS for example).

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • J JonB
                      26 Oct 2018, 07:58

                      @abarmotov
                      I just upgraded to Ubuntu 18.04 (GNOME desktop) yesterday. Everything of mine is default. I don't get green, but I do get orange, so you must have changed theme or something?

                      Assuming it's a "theme" thing, might be problematic?

                      Anyway, now that you have shown what you want it to look like, other experts here may be able to tell you how to achieve in Qt....

                      A Offline
                      A Offline
                      abarmotov
                      wrote on 26 Oct 2018, 08:07 last edited by
                      #13

                      @JonB

                      Yes Ubuntu 18.04 was orange, and Ubuntu 18.10 is green )
                      I want green, as some users "blind" to see without )
                      Greened checked boxes is easy to see and find

                      Is anywhere qt "theme styles catalog" like "fusion" and so on ?
                      github is cool, but is hard to easy search

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 26 Oct 2018, 21:00 last edited by
                        #14

                        Hi,

                        There's no official list, Qt comes with the OS specific style and the fusion style.

                        Take a look at:

                        1. qtbase/src/widgets/styles
                        2. qtbase/src/plugins/styles

                        You might be able to find others like for example in the KDE project.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        13/14

                        26 Oct 2018, 08:07

                        • Login

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