上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页
摘要: 比较旧的方法是 通过继承,重写run方法 设置线程优先级, start() ,后会调 run run结束后,thead会结束执行,但需要手动销毁。 其他有用的方法 wait(), quit(), exit() deletelater(); exec() ; 如果没有exec(), 则不能接收信号槽 阅读全文
posted @ 2023-05-01 03:31 马肯尼煤牙巴骨 阅读(96) 评论(0) 推荐(0)
摘要: 源起 最近在写modbus 封装 modbus中,数据类型只有bool 和 int16 发送float时,需要把float拆成多个int16 接收float时,需要把多个int16拼接成float 写单元测试时,刚开始使用了qlist 所以一直失败,crash 代码是这样的 template<cla 阅读全文
posted @ 2023-04-30 02:45 马肯尼煤牙巴骨 阅读(146) 评论(0) 推荐(0)
摘要: tcp是大端, modbus tcp当然也是大端 一般操作系统都是小端 , 当操作系统 -》 modbus tcp -> plc时 不用关心plc那边是大端还是小端 , 只要面对modbus tcp转换就行了 16位 大小端翻转 #define BigtoLittle16(A) (( ((uint1 阅读全文
posted @ 2023-04-26 20:56 马肯尼煤牙巴骨 阅读(173) 评论(0) 推荐(0)
摘要: 运行目录少了这些东西,手动去qt安装目录复制一份就行, 用windeployqt --qml 部署有时会有问题,(之前在其他电脑没印象有复制这货 | Qt/ | | labs/ | | | platform/ | | | | qtlabsplatformplugin.dll* | | | | plu 阅读全文
posted @ 2023-04-19 16:14 马肯尼煤牙巴骨 阅读(65) 评论(0) 推荐(0)
摘要: 读的时候用共享锁,写的时候用独占锁 struct otherSettingModel { inline static const char* jsonFileSavePath = "../data/otherSettingModel.json"; inline static std::shared_ 阅读全文
posted @ 2023-03-28 15:29 马肯尼煤牙巴骨 阅读(115) 评论(0) 推荐(0)
摘要: parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($de 阅读全文
posted @ 2023-03-28 15:16 马肯尼煤牙巴骨 阅读(320) 评论(0) 推荐(0)
摘要: linuxdeployqt executeable.exe -qmldir=xxx -qmake=xxx QML2_IMPORT_PATH QT_PLUGIN_PATH LD_LIBRARY_PATH 阅读全文
posted @ 2023-03-20 15:23 马肯尼煤牙巴骨 阅读(111) 评论(0) 推荐(0)
摘要: win32:msvc:QMAKE_CXXFLAGS += /utf-8 win32:msvc:QMAKE_CXXFLAGS += /FS 在qt qmake中这两个配置相当于 CONFIGS += utf8_source 如果不使用qmake的跨平台项目,可能会使用到,记录留痕 阅读全文
posted @ 2023-03-15 10:45 马肯尼煤牙巴骨 阅读(225) 评论(0) 推荐(1)
摘要: sudo add-apt-repository ppa:jonathonf/vim sudo apt update sudo apt install vim 阅读全文
posted @ 2023-03-14 11:23 马肯尼煤牙巴骨 阅读(40) 评论(0) 推荐(0)
摘要: 原文:https://stackoverflow.com/questions/1550378/is-it-possible-to-push-a-git-stash-to-a-remote-repository 推 1. git push origin $(for sha in $(git rev-l 阅读全文
posted @ 2023-03-10 21:06 马肯尼煤牙巴骨 阅读(196) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页