1.加载web控件、2.DESTDIR和AppDirPath、3.pro 拷贝文件

1.加载web控件

同加载网页即可,要区别不同的qt版本

#ifdef webkit
    foreach (QWebView *webView, webViews) {
        webView->load(url);
    }
#elif webengine
    foreach (QWebEngineView *webView, webViews) {
        webView->load(url);
    }
#endif

2.DESTDIR和AppDirPath

pro未设置DESKDIR时,两者不一致

DESTDIRbuild-xxx-debug
qApp->applicationDirPath()build-xxx-debug/debug

pro设置DESKDIR后,两者一致

DESTDIR = $$PWD/build
DESTDIRbuild
qApp->applicationDirPath()build

3.pro 拷贝文件

#自动拷贝文件
src_file = $$PWD/file/*
dst_file = $$DESTDIR
win32 {
#转换斜杠 / 到 \\
src_file ~= s,/,\\,g
dst_file ~= s,/,\\,g
dst_file2 ~= s,/,\\,g
QMAKE_POST_LINK += copy $$src_file $$dst_file
}
unix {
QMAKE_POST_LINK += cp -r -f $$src_file $$dst_file
}

项目:https://gitee.com/ch593030323/echartgauge

全局热键https://gitee.com/feiyangqingyun/QWidgetDemo/tree/master/third/shortcut
qwt的多种图表https://gitee.com/feiyangqingyun/QWidgetDemo/tree/master/third/qcustomplotdemo
邮箱https://gitee.com/feiyangqingyun/QWidgetDemo/tree/master/tool/emailtool

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值