PDA

View Full Version : example for using sprintf and vsprintf in Qt-4.7.4



gunturrohith
8th September 2015, 05:51
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

Lesiok
8th September 2015, 07:06
sprintf and vsprintf are standard C functions and Qt is C++ library. So what is the problem ?

gunturrohith
8th September 2015, 08:35
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

Lesiok
8th September 2015, 08:49
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

anda_skoa
8th September 2015, 09:08
If you want to print into a QString, you can use QString::sprintf().

Cheers,
_