Well, it seems these 3 lines solve the issue: widget->style()->unpolish(widget); widget->style()->polish(widget); widget->update();
However this should be handled by the QWidget internally, when it knows that a dynamic property is used in a style. On Thu, Oct 31, 2013 at 3:18 PM, Philipp Kursawe <[email protected]>wrote: > I want to style my QLineEdit in case of an error like this: > > QLineEdit.error { border: 2px solid orange; } > > I have set this style on the QLE parent widget. When I add the dynamic > "class" property in the designer and set it to "error" the QLE gets a nice > thick orange border. > However if I do the same in code: > edit->property("class", "error") > the QLE does not change its border. > > Any ideas? Do I need to force it to refresh? >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
