Results 1 to 3 of 3

Thread: very basic Qt/c++ question

  1. #1
    Join Date
    Jul 2010
    Posts
    72
    Thanks
    35
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default very basic Qt/c++ question

    Hi,

    Ive seen some codes with variables of the type 'qreal' and 'qint'. However, these words do not appear as key words, and therefore cannot be types. What are they?

    An example:
    qint64 writeData(const char *data, qint64 len);


    Cheers

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: very basic Qt/c++ question

    qreal is a typedef for double (or float on ARM)
    qint is typedef for integer type
    link to doc
    Last edited by Zlatomir; 25th July 2010 at 14:56. Reason: Corrected the mistake Wysota mentioned

  3. The following user says thank you to Zlatomir for this useful post:

    Maluko_Da_Tola (25th July 2010)

  4. #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: very basic Qt/c++ question

    Quote Originally Posted by Zlatomir View Post
    qreal is a typedef for float
    It's a typedef for double on all architectures but ARM
    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.


  5. The following user says thank you to wysota for this useful post:

    Zlatomir (25th July 2010)

Similar Threads

  1. Basic question about allocation
    By feraudyh in forum Newbie
    Replies: 5
    Last Post: 24th June 2010, 12:42
  2. A few basic question
    By salmanmanekia in forum Newbie
    Replies: 12
    Last Post: 17th June 2010, 07:46
  3. Basic question
    By giacomelli.fabio in forum Newbie
    Replies: 4
    Last Post: 18th December 2009, 00:12
  4. basic qthread question
    By zl2k in forum Qt Programming
    Replies: 2
    Last Post: 9th September 2008, 21:43
  5. Using QSA: A very basic question
    By yogeshm02 in forum Newbie
    Replies: 3
    Last Post: 26th January 2006, 07:34

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.