JS numbers are stored as double AFAIK hence for big numbers the lowest bits will be less precise.
------- Jean-Michaël Celerier http://www.jcelerier.name On Wed, Jul 12, 2017 at 11:53 AM, Shantanu Tushar <[email protected]> wrote: > Hi, > > I'm trying to call a slot which accepts a qint64 as an argument- > > class Foo : public QObject > { > Q_OBJECT > public slots: > void open(qint64 id) { > qDebug() << "Opening" << id; > } > }; > > from QML- > > onClicked: { > console.log("Opening " + userId); > foo.open(userId); > } > > and I see this output- > > qml: Opening 5762702576189441 > Opening 5762702576189442 > > As you can see the number changes. What am I doing wrong? > > -- > Shantanu Tushar (UTC +0530) > shantanu.io > > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
