Hi On Wed, Jul 12, 2017 at 3:30 PM, Konrad Rosenbaum <kon...@silmor.de> wrote:
> On Wed, July 12, 2017 11:53, Shantanu Tushar wrote: > > and I see this output- > > > > qml: Opening 5762702576189441 > > Opening 5762702576189442 > > > > As you can see the number changes. What am I doing wrong? > > ...you are using JavaScript numbers. All numbers is JS are 32bit floats, > so naturally when you get to high numerical values you lose precision. > What is interesting is that I had declared the variable like this- property var userId: 5762702576189441 And console.log prints the right value. Shouldn't that be wrong as well? Unless the numerical value is somehow important to the user: try to wrap > those numbers in something more opaque. > Any suggestions on what that can be? I tried QVariant instead of qint64 but that didn't help, its still the wrong value. > > Konrad > > Cheers, -- Shantanu Tushar (UTC +0530) shantanu.io
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest