Hi everyone,
I'm creating a Qt application with some web pages loaded on QWebViews and also some plain QWidgets, all inside a QMainWindow. Both the webpages and widgets are going to have some checkboxes here and there, and I'd like them to look the same. Well, at first they DO look the same, because they inherit their style from the native theme engine, but I'd like to define a new CSS style for both.
I tried some things like
image: url(:/image/checkbox_unchecked.png);
}
QCheckBox::indicator:unchecked {
image: url(:/image/checkbox_unchecked.png);
}
To copy to clipboard, switch view to plain text mode
but that only works for checkboxes inside my QWidgets.
I also tried some plain CSS style, but then they only apply to webpage checkboxes.
So, is there a way I could design a single CSS style for checkboxes and apply it to all sorts of checkboxes inside my application?
For the record, I could achieve that when it comes to text selection. I set the main window stylesheet to
selection-color: #363636; selection-background-color: #bfebeb;
selection-color: #363636; selection-background-color: #bfebeb;
To copy to clipboard, switch view to plain text mode
and both web page and qwidget selections followed this style.
Bookmarks