在Ubuntu中,如果想要直接用qDebug()打印字符串,
必须添加头文件
#include <QtDebug>
说明文档
If you pass the function a format string and a list of arguments, it works in similar way to the C printf() function. The format should be a Latin-1 string.
Example:
qDebug("Items in list: %d", myList.size());
If you include , a more convenient syntax is also available:
qDebug() << "Brush:" << myQBrush << "Other value:" << i;