资源简介
利用QT5.9 serialport串口通信模块编写串口调试助手,exe文件可直接运行,附源码。详见
https://blog.csdn.net/qq_43569273/article/details/89015593
代码片段和文件信息
#include “serialport.h“
#include
int main(int argc char *argv[])
{
QApplication a(argc argv);
SerialPort w;
w.show();
return a.exec();
}
//https://blog.csdn.net/tt1995cc/article/details/66969245
//https://blog.csdn.net/imkelt/article/details/53000523
/*
char ConvertHexChar(char ch)
{
if ((ch >= ‘0‘) && (ch <= ‘9‘))
return ch - 0x30;
else if ((ch >= ‘A‘) && (ch <= ‘F‘))
return ch - ‘A‘ + 10;
else if ((ch >= ‘a‘) && (ch <= ‘f‘))
return ch - ‘a‘ + 10;
else return ch - ch;
}
void StringToHex(QString str QByteArray &senddata) //字符串转换为十六进制数据0-F
{
int hexdatalowhexdata;
int hexdatalen = 0;
int len = str.length();
senddata.resize(len / 2);
char lstrhstr;
for (int i = 0; i < len; ) {
hstr = str[i].toLatin1();
if (hstr == ‘ ‘) {
++i;
continue;
}
++i;
if (i >= len) break;
lstr = str[i].toLatin1();
hexdata = ConvertHexChar(hstr);
lowhexdata = ConvertHexChar(lstr);
if ((hexdata == 16) || (lowhexdata == 16))
break;
else
hexdata = hexdata*16 + lowhexdata;
++i;
senddata[hexdatalen] = (char)hexdata;
++hexdatalen;
}
senddata.resize(hexdatalen);
}
if (sendstr.length() % 2){
sendstr.insert(sendstr.length()-1 ‘0‘);
}
StringToHex(sendstr bytes);
qDebug()<<(bytes==QByteArray::fromHex(sendstr.toLatin1().data()));//true
*/
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-04 10:39 SerialPort\
文件 1572 2019-04-04 09:29 SerialPort\main.cpp
文件 10814 2019-04-04 10:02 SerialPort\main.ico
目录 0 2019-04-04 10:04 SerialPort\MinGW32\
目录 0 2019-04-03 22:03 SerialPort\MinGW32\iconengines\
文件 43008 2017-11-16 17:37 SerialPort\MinGW32\iconengines\qsvgicon.dll
目录 0 2019-04-03 22:03 SerialPort\MinGW32\imageformats\
文件 33792 2017-11-16 17:08 SerialPort\MinGW32\imageformats\qgif.dll
文件 46592 2017-11-16 17:37 SerialPort\MinGW32\imageformats\qicns.dll
文件 36352 2017-11-16 17:07 SerialPort\MinGW32\imageformats\qico.dll
文件 247808 2017-11-16 17:07 SerialPort\MinGW32\imageformats\qjpeg.dll
文件 27648 2017-11-16 17:37 SerialPort\MinGW32\imageformats\qsvg.dll
文件 26624 2017-11-16 17:36 SerialPort\MinGW32\imageformats\qtga.dll
文件 507904 2017-11-16 17:36 SerialPort\MinGW32\imageformats\qtiff.dll
文件 25600 2017-11-16 17:36 SerialPort\MinGW32\imageformats\qwbmp.dll
文件 449536 2017-11-16 17:37 SerialPort\MinGW32\imageformats\qwebp.dll
文件 22016 2017-11-16 16:53 SerialPort\MinGW32\libEGL.dll
文件 120334 2015-12-29 06:25 SerialPort\MinGW32\libgcc_s_dw2-1.dll
文件 2807296 2017-11-16 16:52 SerialPort\MinGW32\libGLESV2.dll
文件 1540622 2015-12-29 06:25 SerialPort\MinGW32\libstdc++-6.dll
文件 79360 2015-12-29 06:25 SerialPort\MinGW32\libwinpthread-1.dll
目录 0 2019-04-03 22:03 SerialPort\MinGW32\platforms\
文件 1761280 2017-11-16 17:09 SerialPort\MinGW32\platforms\qwindows.dll
文件 6097408 2019-04-03 22:03 SerialPort\MinGW32\Qt5Core.dll
文件 6205952 2017-11-16 16:58 SerialPort\MinGW32\Qt5Gui.dll
文件 77312 2017-11-16 17:37 SerialPort\MinGW32\Qt5SerialPort.dll
文件 358400 2017-11-16 17:37 SerialPort\MinGW32\Qt5Svg.dll
文件 6355968 2017-11-16 17:04 SerialPort\MinGW32\Qt5Widgets.dll
文件 111616 2019-04-04 10:02 SerialPort\MinGW32\SerialPort.exe
目录 0 2019-04-04 10:06 SerialPort\MSVC2015_64\
目录 0 2019-04-04 09:51 SerialPort\MSVC2015_64\platforms\
............此处省略11个文件信息
- 上一篇:2020成电858真题及答案.zip
- 下一篇:软件测试基础教程资源.zip
相关资源
- QT+Opencv2+VS2012 使用多线程显示网络摄
- Trolltech.Qt.Visual.Studio.Integration.v1.4.3.
- Modbus Poll V6.4+Modbus slave6.0+Virtual Seria
- opencv3.4.1 编译库,可在Qt直接使用
- 串口通讯类SerialPort类
- QTCharts源代码
- qt简单仿mstsc连接远程桌面源码使用
- Qt4开发学生管理系统
- Qt网络编程项目:斗地主+详细设计文
- 基于QT的网络音乐播放器
- qt-creator-win-opensource-2.1.0.exe
- 基于Openmesh的孔洞修补算法
- 免编译解压即用qt-everywhere-opensource-
- qt实现科大讯飞在线语音识别
- QGC地面站源代码
- Qt实现客户端与服务器消息发送与文件
- 基于qt的俄罗斯方块源代码
- qt5-qtwebkit-5.9.1-1.el7.64_32
- Qt creator 调试器
- QtOpencvImageGUI
- eric6 17.12和它的中文汉化包
- QtitanRibbon4.12.0 支持vs2015
- OpenCV 3.3_x86_minGW_world
- qt 学生管理系统
- QT+opencv的图像处理
- VS+QT+Opencv可视化编程
- qt编写的解析16位深tiff灰度图的程序
- qt调用讯飞实时语音接口WEBAPI
- Qt编写的录屏软件,抓屏-合成视频录
- 《Qt 5编程入门》书籍配套源码
评论
共有 条评论