Function qtdata:tonumber() returns a Lua number representing the value contained in the Qt variant. The value nil is returned when the data type cannot be meaningfully converted to a numeric value.