On Wed, 26 Oct 2011 20:47:03 -0500 Terry Brown <terry_n_br...@yahoo.com> 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.