menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

NodeGui

A library for building cross-platform native desktop applications with Node.js and CSS.

Channels
Team

i think when styling the `indicator` on a checkbox it loses the checkmark?

January 18, 2020 at 8:46pm

i think when styling the `indicator` on a checkbox it loses the checkmark?

January 18, 2020 at 8:46pm (Edited 2 years ago)
if i do:
const checkbox = new QCheckBox();
checkbox.setObjectName("checkbox");
checkbox.setText("checkbox");
checkbox.addEventListener("clicked", () => {
console.log(checkbox.isChecked());
});
while doing:
mainWindow.setStyleSheet(`
...
#checkbox::indicator {
border: 1px solid #bdbdbd;
}
`);
the checkmark doesnt show:
Screenshot--01-18-2020--14-51-29.png

January 18, 2020 at 8:53pm
as an aside, im not really sure how you would do #checkbox::indicator via setInlineStyle?

January 23, 2020 at 7:22pm
pseudo selectors are not possible in inline styles. They are only possible by styleSheets
like-fill
1