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 Updated to NodeBB v4.3 + New Features

Green QCheckBox

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

    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 ?

    JonBJ Online
    JonBJ Online
    JonB
    wrote on 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

      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 ?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on 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
      1
      • JonBJ JonB

        @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 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.

        JonBJ 1 Reply Last reply
        0
        • A abarmotov

          @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.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by
          #7

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

          A 1 Reply Last reply
          1
          • JonBJ JonB

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

            A Offline
            A Offline
            abarmotov
            wrote on 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.

            JonBJ 1 Reply Last reply
            0
            • A abarmotov

              @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.

              JonBJ Online
              JonBJ Online
              JonB
              wrote on 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
              0
              • JonBJ JonB

                @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 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

                JonBJ jsulmJ 2 Replies Last reply
                0
                • A abarmotov

                  @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

                  JonBJ Online
                  JonBJ Online
                  JonB
                  wrote on 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
                  0
                  • A abarmotov

                    @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

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 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
                    • JonBJ JonB

                      @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 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
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 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

                        • Login

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