id

override val id: Long(source)

Gets a uniquely assigned identifier for this QObject. This identifier is assigned when the QObject is created. It may vary if the order of creation changes.

Taken in one step. Incrementing the counter and then reading it separately would leave a window in which another model's increment lands between the two, so both QObjects read the same value without either increment being lost.