随笔分类 -  Qt

1 2 3 4 5 ··· 14 下一页
摘要:import sys import cv2 import numpy as np import requests from io import BytesIO from PyQt5.QtWidgets import QApplication, QLabel, QVBoxLayout, QWidget 阅读全文
posted @ 2025-06-16 17:55 西北逍遥 阅读(6) 评论(0) 推荐(0)
摘要:#include <QJsonDocument> #include <QJsonObject> #include <QJsonArray> #include <QJsonValue> #include <QFile> #include <QIODevice> #include <QDebug> // 阅读全文
posted @ 2025-05-13 17:09 西北逍遥 阅读(7) 评论(0) 推荐(0)
摘要:在Ubuntu 20.04上安装Qt 5.15.0 1 安装必要的依赖项: sudo apt-get install build-essential \ libgl1-mesa-dev \ libglu1-mesa-dev \ libegl1-mesa-dev \ libgles2-mesa-dev 阅读全文
posted @ 2025-01-11 00:44 西北逍遥 阅读(1158) 评论(0) 推荐(0)
摘要:https://download.qt.io/archive/qt/5.12/5.12.12/qt-opensource-linux-x64-5.12.12.run 阅读全文
posted @ 2025-01-10 21:45 西北逍遥 阅读(46) 评论(0) 推荐(0)
摘要:#include <QApplication> #include <QWidget> #include <QPainter> #include <QPolygonF> #include <QPoint> #include <QMouseEvent> #include <QMessageBox> cl 阅读全文
posted @ 2024-12-29 23:59 西北逍遥 阅读(77) 评论(0) 推荐(0)
摘要:Qt VTK加载openfoam计算结果.foam文件。 #include <QApplication> #include <QDebug> #include "qvtkopenglwidget.h" #include <vtkSmartPointer.h> #include <vtkGeneric 阅读全文
posted @ 2024-11-28 20:10 西北逍遥 阅读(79) 评论(0) 推荐(0)
摘要:c++实现livox-mid70/360采集、保存点云数据 void PointCloudCallback(uint32_t handle, const uint8_t dev_type, LivoxLidarEthernetPacket* data, void* client_data) { if 阅读全文
posted @ 2024-11-05 07:54 西北逍遥 阅读(429) 评论(0) 推荐(0)
摘要:QMap<QString, int> map; map["one"] = 1; map["three"] = 3; map["seven"] = 7; map.insert("twelve", 12); int num1 = map["thirteen"]; int num2 = map.value 阅读全文
posted @ 2024-10-02 23:48 西北逍遥 阅读(20) 评论(0) 推荐(0)
摘要:QByteArray arr1 = QByteArray::fromHex("000000A1000000B2000005DC00000000000000900000000000000000000000000000000100000020000000210000000100000000001748C 阅读全文
posted @ 2024-09-27 10:49 西北逍遥 阅读(103) 评论(0) 推荐(0)
摘要:#include <QApplication> #include <QFileDialog> #include <QFile> #include <QTextStream> #include <QMessageBox> void saveFileWithDialog() { QString file 阅读全文
posted @ 2024-09-10 10:14 西北逍遥 阅读(74) 评论(0) 推荐(0)
摘要:if (tcpSocketObj->state()==QAbstractSocket::SocketState::ConnectedState) { qDebug() << "send data:"<<dataStr; tcpSocketObj->write(dataStr.toUtf8()); } 阅读全文
posted @ 2024-08-17 22:49 西北逍遥 阅读(24) 评论(0) 推荐(0)
摘要:在Qt中,QTcpSocket 类用于TCP网络编程,它提供了丰富的接口来管理TCP连接。要判断 QTcpSocket 的连接状态,可以使用 state() 方法,该方法返回一个 QAbstractSocket::SocketState 枚举值,表示当前的连接状态。 以下是一些常见的连接状态及其对应 阅读全文
posted @ 2024-08-14 21:52 西北逍遥 阅读(651) 评论(0) 推荐(0)
摘要:pyqt5 combox选择事件绑定 import sys from PyQt5.QtWidgets import QApplication, QWidget, QComboBox, QVBoxLayout, QLabel class ComboBoxExample(QWidget): def __ 阅读全文
posted @ 2024-08-12 15:13 西北逍遥 阅读(230) 评论(0) 推荐(0)
摘要:#include <QDate> #include <QString> #include <QDebug> int main() { // 创建一个QDate对象 QDate date(2023, 4, 5); // 假设日期是2023年4月5日 // 使用toString()方法将日期格式化为yy 阅读全文
posted @ 2024-08-04 13:49 西北逍遥 阅读(37) 评论(0) 推荐(0)
摘要:CD实验 Qt环境 下载 Qt5.12 https://download.qt.io/archive/qt/ ######################## 阅读全文
posted @ 2024-06-13 22:56 西北逍遥 阅读(13) 评论(0) 推荐(0)
摘要:#include <QApplication> #include <QScreen> #include <QDebug> int main(int argc, char *argv[]) { QApplication app(argc, argv); // 获取主屏幕 QScreen *screen 阅读全文
posted @ 2024-06-11 23:32 西北逍遥 阅读(207) 评论(0) 推荐(0)
摘要:QTcpSocket socket; // 连接到远程主机 socket.connectToHost("remoteHost", 1234); // 获取连接状态 QAbstractSocket::SocketState socketState = socket.state(); // 根据连接状态 阅读全文
posted @ 2024-02-21 20:37 西北逍遥 阅读(584) 评论(0) 推荐(0)
摘要:osg qt场景中节点的透明属性消除 { osg::ref_ptr<osg::StateSet> stateState = north_wall_geode->getOrCreateStateSet(); stateState->setMode(GL_BLEND, osg::StateAttribu 阅读全文
posted @ 2024-02-07 22:10 西北逍遥 阅读(46) 评论(0) 推荐(0)
摘要:QVBoxLayout添加图片 #include <QApplication> #include <QWidget> #include <QVBoxLayout> #include <QLabel> #include <QImage> #include <QPixmap> int main(int 阅读全文
posted @ 2024-02-01 21:33 西北逍遥 阅读(76) 评论(0) 推荐(0)
摘要:#include <QApplication> #include <QLineEdit> #include <QDoubleValidator> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLineEdit li 阅读全文
posted @ 2024-01-31 05:24 西北逍遥 阅读(220) 评论(0) 推荐(0)

1 2 3 4 5 ··· 14 下一页