更新代码

master
feiyangqingyun 2021-11-28 11:16:54 +08:00
parent a187aba3e9
commit 73668611c6
19 changed files with 147 additions and 3 deletions

View File

@ -2,12 +2,27 @@
#include "widget.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
Widget w;
w.setWindowTitle("Echart图表JS交互示例 (QQ: 517216493 WX: feiyangqingyun)");
w.show();

View File

@ -2,12 +2,27 @@
#include "widget.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
Widget w;
w.setWindowTitle("回车自动跳转 (QQ: 517216493 WX: feiyangqingyun)");
w.show();

View File

@ -2,12 +2,27 @@
#include "widget.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
Widget w;
w.setWindowTitle("鼠标十字线 (QQ: 517216493 WX: feiyangqingyun)");
w.show();

View File

@ -2,12 +2,27 @@
#include "frmhotkey.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
frmHotKey w;
w.setWindowTitle("全局热键示例 (QQ: 517216493 WX: feiyangqingyun)");
w.show();

View File

@ -2,12 +2,27 @@
#include "widget.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
Widget w;
w.setWindowTitle("miniblink使用示例 (QQ: 517216493 WX: feiyangqingyun)");
w.show();

View File

@ -1,8 +1,13 @@
#include "miniblink.h"
#pragma execution_character_set("utf-8")
#include "miniblink.h"
#include "qapplication.h"
#include "qmessagebox.h"
#include "qdatetime.h"
#include "qfile.h"
#include "qvariant.h"
#include "qdebug.h"
#define TIMEMS QTime::currentTime().toString("hh:mm:ss zzz")
void onLoadingFinish(wkeWebView, void *param, const wkeString, wkeLoadingResult result, const wkeString)
{
//qDebug() << "onLoadingFinish" << result;
@ -56,14 +61,22 @@ void miniblink::init()
isInit = true;
//不同的构建套件位数加载不同的动态库
#ifdef Q_OS_WIN64
QString flag = "64";
QString file = qApp->applicationDirPath() + "/miniblink_64.dll";
#else
QString flag = "32";
QString file = qApp->applicationDirPath() + "/miniblink.dll";
#endif
//如果文件不存在则提示
if (!QFile(file).exists()) {
QMessageBox::critical(0, "错误", file + "\n文件不存在请先拷贝!");
return;
}
const wchar_t *path = reinterpret_cast<const wchar_t *>(file.utf16());
wkeSetWkeDllPath(path);
bool ok = wkeInitialize();
qDebug() << QString("init miniblink %1").arg(ok ? "ok" : "error");
qDebug() << TIMEMS << QString("init miniblink_%1 %2").arg(flag).arg(ok ? "ok" : "error");
}
}

View File

@ -1,11 +1,27 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include "qapplication.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
frmMain w;
w.setWindowTitle("qwt无插件示例 (QQ: 517216493 WX: feiyangqingyun)");

View File

@ -2,12 +2,27 @@
#include "frmshortcut.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
frmShortCut w;
w.setWindowTitle("全局热键示例 (QQ: 517216493 WX: feiyangqingyun)");
w.show();

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "appkey.h"
#include "qmutex.h"
#include "qfile.h"

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include "ui_frmmain.h"
#include "appkey.h"

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include "appkey.h"
#include <QApplication>

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include "ui_frmmain.h"
#include "qmessagebox.h"

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include <QApplication>
#include <QTextCodec>

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "applive.h"
#include "qmutex.h"
#include "qudpsocket.h"

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include "applive.h"
#include <QApplication>

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include "ui_frmmain.h"
#include "qtimer.h"

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "frmmain.h"
#include "trayicon.h"
#include "app.h"

View File

@ -2,12 +2,27 @@
#include "widget.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
#endif
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#else
QTextCodec *codec = QTextCodec::codecForName("utf-8");
QTextCodec::setCodecForLocale(codec);
#endif
Widget w;
w.setWindowTitle("存款计算器 (QQ: 517216493 WX: feiyangqingyun)");
w.show();

View File

@ -1,4 +1,5 @@
#pragma execution_character_set("utf-8")
#include "widget.h"
#include "ui_widget.h"
#include "qmessagebox.h"