Results 1 to 5 of 5

Thread: example for using sprintf and vsprintf in Qt-4.7.4

  1. #1
    Join Date
    Nov 2014
    Posts
    54
    Thanks
    5
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default example for using sprintf and vsprintf in Qt-4.7.4

    Hi,

    I am beginner in Qt Programming and i am searching for the examples regarding the sprintf and vsprintf in Qt.
    I have gone through the Qt assistant and according to that i am trying some examples on my but i want the precise examples that teach the understanding of their usage.
    Please some body help me.

    Thanks in advance,
    Rohith.G

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: example for using sprintf and vsprintf in Qt-4.7.4

    sprintf and vsprintf are standard C functions and Qt is C++ library. So what is the problem ?

  3. #3
    Join Date
    Nov 2014
    Posts
    54
    Thanks
    5
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: example for using sprintf and vsprintf in Qt-4.7.4

    Hi,
    Lesiok thanks for replying me.
    can we use the same implementation syntax of sprintf and vsprintf as of C in Qt..? also.

    Thanks & Regards,
    Rohith.G

  4. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: example for using sprintf and vsprintf in Qt-4.7.4

    Qt is NOT programming language. Qt is a library written in C ++ or Qt is a C ++.
    Basically, you first need to know C ++ to use Qt

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

    gunturrohith (8th September 2015)

  6. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: example for using sprintf and vsprintf in Qt-4.7.4

    If you want to print into a QString, you can use QString::sprintf().

    Cheers,
    _

  7. The following user says thank you to anda_skoa for this useful post:

    gunturrohith (8th September 2015)

Similar Threads

  1. Sprintf in QT ?
    By wilcd in forum Newbie
    Replies: 1
    Last Post: 28th April 2012, 12:05

Tags for this Thread

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.