提交 98e52679 编写于 作者: K khz-pc

[Qt] 01_Qt日志信息打印

上级 59f4ce96
#include "mydll.h"
#include <Windows.h>
#include <QIcon>
#include <QPixmap>
#include <QMediaContent>
......@@ -8,11 +9,12 @@
#include <fstream>
#include <QDir>
#include <Windows.h>
#include <QTextStream>
#include <QDebug>
Mydll g_dll;
Mydll::Mydll()
void test_export_resource()
{
// 测试一个icon
{
......@@ -66,3 +68,20 @@ Mydll::Mydll()
// QMediaContent content("qrc:/media/audio/1.mp3");
}
void MyLog(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
OutputDebugStringA(msg.toStdString().data());
}
void test_qdebug()
{
qInstallMessageHandler(MyLog);
}
Mydll::Mydll()
{
test_qdebug();
return;
test_export_resource();
}
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册