Green QCheckBox
-
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 ? -
Hi
I think you will have to use images, not sure the background s used for painting.
http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcheckboxRegarding the height of square. I think you need subclass it and make manual resize
as the options are a bit static with stylesheetQCheckBox::indicator { width: 40px; height: 40px; }
-
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 ?
@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 :)
-
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 ?@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;
? -
@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;
?@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. -
@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.@abarmotov
Yes, that's what I get. Were you expecting something different? -
@abarmotov
Yes, that's what I get. Were you expecting something different?@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. -
@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.@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? -
@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?@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 -
@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@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....
-
@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@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). -
@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....
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 findIs anywhere qt "theme styles catalog" like "fusion" and so on ?
github is cool, but is hard to easy search -
Hi,
There's no official list, Qt comes with the OS specific style and the fusion style.
Take a look at:
qtbase/src/widgets/styles
qtbase/src/plugins/styles
You might be able to find others like for example in the KDE project.