I need to set border color based on some dynamic property and am using the following stylesheet for the same -

QWidget[editFocus="true"]
{
border: 3px solid rgb(20,15,255);
}
Now if I set the dynamic property 'editFocus' through designer it loads properly the first time. This is obvious.

But when I change the value of "editFocus" through code at runtime, the color doesnt get updated. Is it the correct behaviour ?

What I want to achieve is the border color should change on the widget having focus or edit Focus. This is similar to the edit-focus for Qt for Embedded. But since normal applications dont have such kind of behaviour, am trying to do it on my own.