摘要:
if (m_url.indexOf("wss://") >= 0) { QSslConfiguration sslConfiguration = m_pWebSocket->sslConfiguration(); sslConfiguration.setPeerVerifyMode(QSslSock 阅读全文
摘要:
从websocket接收QString值,直接用QString::toStdString转成std::string会导致程序崩溃,如下图 解决办法: 使用 std::string str = std::string((const char *)msg.toLocal8Bit()); 进行转换 阅读全文
摘要:
QByteArray array; array[0] = 0xAA; QString str = QLatin1String(array); QString str2 = QString::fromLatin1(array); qDebug() << array << str << str.toLa 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO.Ports; namespace S 阅读全文
摘要:
QT 服务端代码: .h #ifndef LOCALSERVER_H #define LOCALSERVER_H #include <QObject> #include <QtNetwork> class LocalServer : public QObject { Q_OBJECT public: 阅读全文
摘要:
SOURCES += \ main.cpp \ mainwindow.cpp \ xxxx.cpp HEADERS += \ mainwindow.h \ xxx/xx/xxx.h \ xxxx.h FORMS += \ mainwindow.ui DISTFILES += \ xxx/xx/xxx 阅读全文
摘要:
//方法1 void (QTcpSocket::*onErr)(QAbstractSocket::SocketError) = &QTcpSocket::error; connect(m_tcpClient, onErr, this, &TcpClient::onTcpError); //方法2 c 阅读全文
摘要:
#include <QDebug> #define log qDebug() << "[" << __FILE__ << ":" << __LINE__ << "]" cv::Mat resImage = cv::imread(resPath); cv::Mat targetImage = cv:: 阅读全文
摘要:
main.js worker.js 阅读全文