Are Qt's stylesheets really handling _dynamic_ properties?

后端 未结 4 416
名媛妹妹
名媛妹妹 2021-01-04 01:47

Is Qt\'s dynamic properties really so dynamic with stylesheets?

I have the basic example from stylesheets and dynamic properties:

/*stylesheet:*/
*[f         


        
4条回答
  •  青春惊慌失措
    2021-01-04 02:22

    I found a quick, although a bit hackish, way to update widget's styling.

    myWidget->style()->unpolish(myWidget);
    myWidget->ensurePolished();
    

    Doing this after changing properties keeps correlation between property data and UI.

提交回复
热议问题