On Wed, 26 Oct 2011 20:47:03 -0500
Terry Brown <[email protected]> wrote:
> the lists say that the cheapest
> way to get styling on a widget re-done is
>
> w.style().unpolish(w)
> w.style().polish(w)
(a) this doesn't appear to be working reliably
(b) just found an alternative,
w.setStyleSheet("/* */")
works great when your using class type styles and Qt doesn't notice,
i.e.
+ # check work date < due date and do stylesheet re-evaluation stuff
+ nwd = self.getat(v, 'nextworkdate')
+ due = self.getat(v, 'duedate')
+ w = self.ui.UI.frmDates
+ if nwd and due and str(nwd) > str(due):
+ w.setProperty('style_class', 'tododate_error')
+ else:
+ w.setProperty('style_class', '')
+ w.setStyleSheet("/* */")
with a corresponding
QWidget#frmDates[style_class ~= 'tododate_error'] * {
color: red;
/* background: #4f0308; */
}
somewhere in your styles.
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.