[Development] How to skip write property in qml's property binding?

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue Jul 23 16:58:55 CEST 2024


On 22/07/2024 07:11, André Somers via Development wrote:
> 
> On 19-07-2024 11:25, JiDe Zhang wrote:
>> Thank you, but I can't use `text: fooObject?.foo ?? ""`, because I 
>> would not the `text` property change if when fooObject change to null.
>> If fooObject's new value is null, I want the |text|​ property keep old 
>> value.|​|​
> 
> Sounds to me you need an assignment, not a binding.
> 

Indeed it looks like something hybrid between binding and assignment. 
Should be doable with a custom Binding-like element?

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - Trusted Software Excellence

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240723/bde8e714/attachment.bin>


More information about the Development mailing list