会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
朱小勇
博客园
园子
首页
新随笔
联系
管理
订阅
上一页
1
···
51
52
53
54
55
56
57
58
59
···
133
下一页
2020年11月7日
Qt+广播
摘要: 1、接收广播 //方式1 udp->bind(QHostAddress(ip),port); //方式2 udp->bind(QHostAddress::AnyIPv4,port); 方式1是绑定指定的ip和端口,在windows上是能正常接收到,但是在linux【中标麒麟】下接收不到,只有换成方式
阅读全文
posted @ 2020-11-07 14:15 朱小勇
阅读(507)
评论(0)
推荐(0)
2020年11月1日
在std::set里放结构体的问题
摘要: 1、直接放 std::set<NetworkInfo> networks; 其中NetworkInfo是一个自定义结构体 //网络信息配置结构体 struct NetworkInfo { bool isRuning; //是否正在运行 Protocol netWorkProtocol; //协议 Q
阅读全文
posted @ 2020-11-01 16:06 朱小勇
阅读(889)
评论(0)
推荐(0)
2020年10月30日
C++/Qt个人编码规范
摘要: 1、类私有函数命名:下划线+函数名 void _init(); 2、类私有成员名称:"m_"+驼峰变量名 int m_value; 3、基本的容器类型全部使用C++stl中的,string用Qt的QString 顺序容器: vector string (它不是类模板) list forward_li
阅读全文
posted @ 2020-10-30 15:58 朱小勇
阅读(807)
评论(0)
推荐(0)
Qt源码解析系列-xxx
摘要: 待更新
阅读全文
posted @ 2020-10-30 15:55 朱小勇
阅读(864)
评论(0)
推荐(0)
QML绘制拓扑图
摘要:
阅读全文
posted @ 2020-10-30 10:33 朱小勇
阅读(598)
评论(0)
推荐(0)
2020年10月22日
QVector清空
摘要: 对于QVector: QVector<TSendProt> sendData; 想要清空: 1、clear只删除元素,但是占用空间不变,即capacity不变 sendData.clear(); 2、swap删除元素,空间也释放 QVector<TSendProt>().swap(sendData)
阅读全文
posted @ 2020-10-22 09:45 朱小勇
阅读(4281)
评论(0)
推荐(0)
2020年10月14日
可进行组合的枚举
摘要: enum MatchFlag { MatchExactly = 0, MatchContains = 1, MatchStartsWith = 2, MatchEndsWith = 3, MatchRegExp = 4, MatchWildcard = 5, MatchFixedString = 8
阅读全文
posted @ 2020-10-14 16:03 朱小勇
阅读(200)
评论(0)
推荐(0)
2020年10月9日
查看Qt自带的QSS
摘要: 在help里输入: Qt Style Sheets Example
阅读全文
posted @ 2020-10-09 11:39 朱小勇
阅读(382)
评论(0)
推荐(0)
通过文件设置QSS
摘要: QFile qss(":/qss/qss/qss.qss");//设置qss文件打开路径 qss.open(QFile::ReadOnly);//只读,打开qss文件 if(qss.isOpen()) { this->setStyleSheet(qss.readAll());//如果打开成功,设置样
阅读全文
posted @ 2020-10-09 10:34 朱小勇
阅读(382)
评论(0)
推荐(1)
2020年10月4日
QString转QByteArray
摘要: 1、十六进制字符串转QByteArray QByteArray ba = QByteArray::fromHex(info.toLatin1()); 2、ASIIC字符串转QByteArray QByteArray ba = info.toLatin1();
阅读全文
posted @ 2020-10-04 23:26 朱小勇
阅读(896)
评论(0)
推荐(0)
上一页
1
···
51
52
53
54
55
56
57
58
59
···
133
下一页
公告