上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 133 下一页
摘要: 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)
摘要: 1、直接放 std::set<NetworkInfo> networks; 其中NetworkInfo是一个自定义结构体 //网络信息配置结构体 struct NetworkInfo { bool isRuning; //是否正在运行 Protocol netWorkProtocol; //协议 Q 阅读全文
posted @ 2020-11-01 16:06 朱小勇 阅读(889) 评论(0) 推荐(0)
摘要: 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)
摘要: 待更新 阅读全文
posted @ 2020-10-30 15:55 朱小勇 阅读(864) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-10-30 10:33 朱小勇 阅读(598) 评论(0) 推荐(0)
摘要: 对于QVector: QVector<TSendProt> sendData; 想要清空: 1、clear只删除元素,但是占用空间不变,即capacity不变 sendData.clear(); 2、swap删除元素,空间也释放 QVector<TSendProt>().swap(sendData) 阅读全文
posted @ 2020-10-22 09:45 朱小勇 阅读(4281) 评论(0) 推荐(0)
摘要: 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)
摘要: 在help里输入: Qt Style Sheets Example 阅读全文
posted @ 2020-10-09 11:39 朱小勇 阅读(382) 评论(0) 推荐(0)
摘要: 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)
摘要: 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 下一页