We want to customize the display of a dialog using QUiLoader Class and customer specific ui-files. Within the text of the QLabel-s we are thinking of allowing certain placeholders like $(serial), $(type) that can be replaced by the program with current data. But how can we change the style (color) of the text inside QLabel based on customer specific rules like "{ color : [$(defectCount) > 3 ? 'red' : 'black']; }"? We could use QJSEngine and parse for defined delimiters to spot the script parts in the QLabel text, pass them to a QJSEngine and replace them with the result. Is there a simpler way?

Thanks for any hints.