qt - 如何用新窗口显示每个 qDebug?
问题描述
我制作了一个 QT 控制台程序。我想通过新窗口显示每个命令。我怎么能那样做??
主文件
我使用的系统是带有QT的win10。
#include <QCoreApplication>
#include <QDebug> //在文字視窗輸出文字功能函式
#include <QDir> //搜尋資料夾功能函式
#include <QFileInfo> //顯示檔案資訊
#include <QString> //字串函式
#include <QStringList> //字串陣列函式
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QDir mDir; //設定資料夾位置
qDebug() << mDir.exists(); //輸出確定是否有mDir資料夾
QString command = "frtomem -p WnaYooAQ ";
foreach(QFileInfo mitm, mDir.entryInfoList(Qfilter)) //列出所有資料夾中篩選的檔案內容
{
qDebug() << command << mitm.fileName();
}
return a.exec();
}
我只能通过一个控制台窗口显示它。不能分开它。
解决方案
推荐阅读
- php - curl - 响应的空标题
- java - 如何在 Android 中正确管理领域以数据绑定视图,但关闭所有领域实例?
- spring - 编写没有价值的 REST API 时会返回什么?
- javascript - 验证表单中的非法字符
- python - 循环内的 Python 工作日
- mysql - 如何根据mysql中其他两列的数据在列中插入数据
- c# - 如何实例化泛型类
- xml - Powershell 中的 XML 解析
- azure - 在虚拟机上运行命令失败并阻止其他“Invoke-AzureRmVMRunCommand”
- python - 在 Pandas 中,在 grouby 和 pd.cut 之后,如何重新排列数据框以随时间按每个 bin 绘制?