[Development] std::optional for Q_PROPERTY

Kai Uwe Broulik kde at privat.broulik.de
Thu Jul 20 16:48:32 CEST 2023


Hi,

 > That would mostly work, unless you want
 > a RESETable property, where RESET shouldn't lead to a nullopt value.

It’s perfectly valid to have RESET set the value to whatever it thinks 
is correct, isn’t it? All it means is I can assign `undefined` from QML 
and have _something_ come out of it. Even the Qt documentation mention 
it was “the default cursor” which isn’t “null”.

Cheers
Kai Uwe


More information about the Development mailing list