随笔分类 -  Qt

摘要:if (m_url.indexOf("wss://") >= 0) { QSslConfiguration sslConfiguration = m_pWebSocket->sslConfiguration(); sslConfiguration.setPeerVerifyMode(QSslSock 阅读全文
posted @ 2021-06-10 17:05 一夜梦想 阅读(1402) 评论(0) 推荐(0) 编辑
摘要:从websocket接收QString值,直接用QString::toStdString转成std::string会导致程序崩溃,如下图 解决办法: 使用 std::string str = std::string((const char *)msg.toLocal8Bit()); 进行转换 阅读全文
posted @ 2020-11-13 16:17 一夜梦想 阅读(2523) 评论(0) 推荐(0) 编辑
摘要:QByteArray array; array[0] = 0xAA; QString str = QLatin1String(array); QString str2 = QString::fromLatin1(array); qDebug() << array << str << str.toLa 阅读全文
posted @ 2020-09-07 17:30 一夜梦想 阅读(710) 评论(0) 推荐(0) 编辑
摘要:QT 服务端代码: .h #ifndef LOCALSERVER_H #define LOCALSERVER_H #include <QObject> #include <QtNetwork> class LocalServer : public QObject { Q_OBJECT public: 阅读全文
posted @ 2020-07-08 11:47 一夜梦想 阅读(510) 评论(0) 推荐(0) 编辑
摘要:SOURCES += \ main.cpp \ mainwindow.cpp \ xxxx.cpp HEADERS += \ mainwindow.h \ xxx/xx/xxx.h \ xxxx.h FORMS += \ mainwindow.ui DISTFILES += \ xxx/xx/xxx 阅读全文
posted @ 2020-04-24 09:28 一夜梦想 阅读(1617) 评论(0) 推荐(0) 编辑
摘要://方法1 void (QTcpSocket::*onErr)(QAbstractSocket::SocketError) = &QTcpSocket::error; connect(m_tcpClient, onErr, this, &TcpClient::onTcpError); //方法2 c 阅读全文
posted @ 2020-04-02 16:30 一夜梦想 阅读(1032) 评论(0) 推荐(0) 编辑
摘要:#include <QDebug> #define log qDebug() << "[" << __FILE__ << ":" << __LINE__ << "]" cv::Mat resImage = cv::imread(resPath); cv::Mat targetImage = cv:: 阅读全文
posted @ 2019-11-15 14:20 一夜梦想 阅读(1251) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2019-03-12 16:57 一夜梦想 阅读(2) 评论(0) 推荐(0) 编辑
摘要:取数据: 鼠标移动: 阅读全文
posted @ 2018-11-28 17:59 一夜梦想 阅读(7137) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示