[Development] QProperty and when evaluation occurs

Thiago Macieira thiago.macieira at intel.com
Thu Jul 23 22:53:23 CEST 2020


On Thursday, 23 July 2020 12:59:25 PDT Filippo Cucchetto wrote:
> Il giorno gio 23 lug 2020 alle ore 21:15 Volker Hilsheimer
> 
> <volker.hilsheimer at qt.io> ha scritto:
> > But why would we calculate the volume if nobody cares about the volume? :)
> 
> Sometimes you want to notify or take actions immediately:
> - notify the new volume value through a websocket for being consumed
> by javascript
> - send an email/message after an alarm has been triggered

If a property is connected to a slot that doesn't support lazy evaluation, 
then the entire chain must be re-evaluated as soon as any of the properties is 
marked dirty. QProperty needs to do that on its own. There's no need for 
QTimer.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list