Results 1 to 4 of 4

Thread: NSNumber equivalent in Qt

  1. #1
    Join Date
    Feb 2013
    Posts
    50
    Thanks
    5

    Default NSNumber equivalent in Qt

    Hello,

    I was wondering what is a similar or equivalent class to NSNumber in iOS, in Qt??
    https://developer.apple.com/library/...Reference.html
    Thanks.

  2. #2
    Join Date
    Dec 2012
    Posts
    90
    Thanks
    5
    Thanked 20 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: NSNumber equivalent in Qt

    Just list all the classes you are using in one thread

    I don't think there's direct alternative, but you can use QVariant too.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: NSNumber equivalent in Qt

    long long int
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: NSNumber equivalent in Qt

    Or float, or double, or bool.

    Using a generic storage like QVariant just because it is "equivalent" to the scripting-style-thingy NSNumber is ignoring the characteristics of the actual problem you are trying to solve. If you need to store integers use an appropriately sized int. If you want floating point use float or double, If you want boolean values use bool.

Similar Threads

  1. QSettings equivalent in QML?
    By Koying in forum Qt Quick
    Replies: 3
    Last Post: 15th August 2012, 04:25
  2. cin Equivalent in Qt
    By amiref in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2011, 19:16
  3. Qt equivalent of .Xdefaults?
    By kevinm in forum Newbie
    Replies: 2
    Last Post: 17th October 2008, 23:44
  4. CStatic-equivalent
    By solarrobor in forum Qt Programming
    Replies: 1
    Last Post: 28th June 2008, 14:54
  5. equivalent
    By deepa.selvaraj in forum Qt Programming
    Replies: 3
    Last Post: 12th November 2007, 19:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.