[Qt-interest] How to get a string with the current function name?

Alessandro Portale alessandro.portale at nokia.com
Tue Nov 30 19:24:19 CET 2010


On 11/30/2010 7:04 PM, ext Christian Gagneraud wrote:
> On 11/30/2010 05:32 PM, Marcelo Magno T. Sales wrote:
>> Hello,
>> Is it possible to get the current function/method name in a string, for
>> debugging purposes? How?
> What I usually do is something like:
> #define DEBUG qDebug()<<  __FILE__<<  __LINE__<<  __FUNCTION__

In addition to these, Qt also offers Q_FUNC_INFO
   http://doc.qt.nokia.com/latest/qtglobal.html#Q_FUNC_INFO



More information about the Qt-interest-old mailing list