How to show every qDebug with new window?

147 Views Asked by At

I make a QT console program. I want to show every command by new window. How could I do that ??

main.cpp

I use system is win10 with QT.

#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();
}

I just can show it by one console window. can't separete it.

0

There are 0 best solutions below