Re: [Interest] [QML] Override property value in some cases only

2024-10-12 Thread Alexander Dyagilev
OK, I think QML should have a special syntax then. For example, TextField { font.family: text.contains("test") ? "Inter" : *untouched* } So, I do not then want for QML to even keep a default value somewhere. All I would like is for it to be able to just not change property value except the sp

[Interest] [QML] Override property value in some cases only

2024-10-12 Thread Alexander Dyagilev
Hello, As example, let's suppose I would like to change font name for a TextField only in case it contains "test" text. What is the best way to do it in QML? Is there any special syntax maybe? TextField { font.family: text.contains("test") ? "Inter" : DONT_CHANGE_PROPERTY } _