qt中qDebug()编译报错

阅读 54

2022-04-08

在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;

精彩评论(0)

0 0 举报