更新代码
parent
a187aba3e9
commit
73668611c6
|
@ -2,12 +2,27 @@
|
||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
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;
|
Widget w;
|
||||||
w.setWindowTitle("Echart图表JS交互示例 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("Echart图表JS交互示例 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -2,12 +2,27 @@
|
||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
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;
|
Widget w;
|
||||||
w.setWindowTitle("回车自动跳转 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("回车自动跳转 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -2,12 +2,27 @@
|
||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
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;
|
Widget w;
|
||||||
w.setWindowTitle("鼠标十字线 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("鼠标十字线 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -2,12 +2,27 @@
|
||||||
|
|
||||||
#include "frmhotkey.h"
|
#include "frmhotkey.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
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;
|
frmHotKey w;
|
||||||
w.setWindowTitle("全局热键示例 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("全局热键示例 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -2,12 +2,27 @@
|
||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
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;
|
Widget w;
|
||||||
w.setWindowTitle("miniblink使用示例 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("miniblink使用示例 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
#include "miniblink.h"
|
#pragma execution_character_set("utf-8")
|
||||||
|
#include "miniblink.h"
|
||||||
#include "qapplication.h"
|
#include "qapplication.h"
|
||||||
|
#include "qmessagebox.h"
|
||||||
|
#include "qdatetime.h"
|
||||||
|
#include "qfile.h"
|
||||||
#include "qvariant.h"
|
#include "qvariant.h"
|
||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
|
|
||||||
|
#define TIMEMS QTime::currentTime().toString("hh:mm:ss zzz")
|
||||||
void onLoadingFinish(wkeWebView, void *param, const wkeString, wkeLoadingResult result, const wkeString)
|
void onLoadingFinish(wkeWebView, void *param, const wkeString, wkeLoadingResult result, const wkeString)
|
||||||
{
|
{
|
||||||
//qDebug() << "onLoadingFinish" << result;
|
//qDebug() << "onLoadingFinish" << result;
|
||||||
|
@ -56,14 +61,22 @@ void miniblink::init()
|
||||||
isInit = true;
|
isInit = true;
|
||||||
//不同的构建套件位数加载不同的动态库
|
//不同的构建套件位数加载不同的动态库
|
||||||
#ifdef Q_OS_WIN64
|
#ifdef Q_OS_WIN64
|
||||||
|
QString flag = "64";
|
||||||
QString file = qApp->applicationDirPath() + "/miniblink_64.dll";
|
QString file = qApp->applicationDirPath() + "/miniblink_64.dll";
|
||||||
#else
|
#else
|
||||||
|
QString flag = "32";
|
||||||
QString file = qApp->applicationDirPath() + "/miniblink.dll";
|
QString file = qApp->applicationDirPath() + "/miniblink.dll";
|
||||||
#endif
|
#endif
|
||||||
|
//如果文件不存在则提示
|
||||||
|
if (!QFile(file).exists()) {
|
||||||
|
QMessageBox::critical(0, "错误", file + "\n文件不存在请先拷贝!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const wchar_t *path = reinterpret_cast<const wchar_t *>(file.utf16());
|
const wchar_t *path = reinterpret_cast<const wchar_t *>(file.utf16());
|
||||||
wkeSetWkeDllPath(path);
|
wkeSetWkeDllPath(path);
|
||||||
bool ok = wkeInitialize();
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,27 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include "qapplication.h"
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, 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;
|
frmMain w;
|
||||||
w.setWindowTitle("qwt无插件示例 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("qwt无插件示例 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
|
|
|
@ -2,12 +2,27 @@
|
||||||
|
|
||||||
#include "frmshortcut.h"
|
#include "frmshortcut.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
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;
|
frmShortCut w;
|
||||||
w.setWindowTitle("全局热键示例 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("全局热键示例 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "appkey.h"
|
#include "appkey.h"
|
||||||
#include "qmutex.h"
|
#include "qmutex.h"
|
||||||
#include "qfile.h"
|
#include "qfile.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include "ui_frmmain.h"
|
#include "ui_frmmain.h"
|
||||||
#include "appkey.h"
|
#include "appkey.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include "appkey.h"
|
#include "appkey.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include "ui_frmmain.h"
|
#include "ui_frmmain.h"
|
||||||
#include "qmessagebox.h"
|
#include "qmessagebox.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "applive.h"
|
#include "applive.h"
|
||||||
#include "qmutex.h"
|
#include "qmutex.h"
|
||||||
#include "qudpsocket.h"
|
#include "qudpsocket.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include "applive.h"
|
#include "applive.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include "ui_frmmain.h"
|
#include "ui_frmmain.h"
|
||||||
#include "qtimer.h"
|
#include "qtimer.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "frmmain.h"
|
#include "frmmain.h"
|
||||||
#include "trayicon.h"
|
#include "trayicon.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
|
|
@ -2,12 +2,27 @@
|
||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
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;
|
Widget w;
|
||||||
w.setWindowTitle("存款计算器 (QQ: 517216493 WX: feiyangqingyun)");
|
w.setWindowTitle("存款计算器 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
#include "ui_widget.h"
|
#include "ui_widget.h"
|
||||||
#include "qmessagebox.h"
|
#include "qmessagebox.h"
|
||||||
|
|
Loading…
Reference in New Issue