Thank you Mike, My answer is "what it last was before fooObject went null", and 
I was use it in my project.

Relatively speaking, "text: fooObject?.title ?? text" is the easiest way to 
understand so far.
________________________________
From: Development <[email protected]> on behalf of JiDe Zhang 
<[email protected]>
Sent: Wednesday, August 7, 2024 16:26
To: [email protected] <[email protected]>; Ulf Hermann 
<[email protected]>
Subject: Re: [Development] How to skip write property in qml's property binding?

I can't add the RESET attribute to the property, because that properties isn't 
defined in my project.

Also, I don't want this attribute to be reset. I want it to retain its current 
value, it has lost its binding state only.
________________________________
From: Development <[email protected]> on behalf of Ulf Hermann 
via Development <[email protected]>
Sent: Monday, August 5, 2024 18:42
To: [email protected] <[email protected]>
Subject: Re: [Development] How to skip write property in qml's property binding?

Hi,

you should also be able to add a RESET attribute to the property. It is
conveniently triggered when assigning undefined to the property and
resets it to the default value. This may be the cleanest way to deal
with it.

best regards,
Ulf
--
Development mailing list
[email protected]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.qt-project.org%2Flistinfo%2Fdevelopment&data=05%7C02%7C%7C7be140e254e2416b18bb08dcb53b9829%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638584514769766452%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=f8d7Gx7n984oM%2F9qtJgVIUP%2FhB%2B8MyIkCcAGAplCM%2Bs%3D&reserved=0<https://lists.qt-project.org/listinfo/development>
-- 
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to