随笔分类 -  Qt

1 2 3 4 5 ··· 15 下一页
摘要:在 Qt 中,QPainter 的 Brush 设置是用于填充图形内部的。一旦你为 QPainter 设置了 Brush,它将被用于所有后续需要填充的绘图操作,直到后续改变这个 Brush 或者关闭填充(例如通过设置一个透明的或者纯色的 Brush)。重置 Brush:可以通过调用 QPainter 阅读全文
posted @ 2026-01-13 20:34 西北逍遥 阅读(11) 评论(0) 推荐(0)
摘要:# import mysql.connector from datetime import datetime, timezone from PyQt5.QtCore import pyqtSignal, QObject import time import threading class VC_DB 阅读全文
posted @ 2026-01-01 01:30 西北逍遥 阅读(4) 评论(0) 推荐(0)
摘要:C++ Qt绘制图表,用鼠标点击图表的series的名称,实现图表中线条隐藏与显示 private slots: void onLegendMarkerClicked() { bool checked = false; qDebug() << "" << checked; QLegendMarker 阅读全文
posted @ 2025-12-19 23:21 西北逍遥 阅读(56) 评论(0) 推荐(0)
摘要:#include <QApplication> #include <QtCharts/QChartView> #include <QtCharts/QLineSeries> #include <QtCharts/QValueAxis> #include <QFont> #include <QTool 阅读全文
posted @ 2025-12-17 22:20 西北逍遥 阅读(42) 评论(0) 推荐(0)
摘要:#ifndef THERMAL_COLOR_MAP_H #define THERMAL_COLOR_MAP_H #include <QVector> #include <QColor> class ThermalColorMap { public: ThermalColorMap() { // 冷色 阅读全文
posted @ 2025-12-16 23:42 西北逍遥 阅读(40) 评论(0) 推荐(0)
摘要: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 西北逍遥 阅读(27) 评论(0) 推荐(0)
摘要:#include <QJsonDocument> #include <QJsonObject> #include <QJsonArray> #include <QJsonValue> #include <QFile> #include <QIODevice> #include <QDebug> // 阅读全文
posted @ 2025-05-13 17:09 西北逍遥 阅读(20) 评论(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 西北逍遥 阅读(1334) 评论(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 西北逍遥 阅读(64) 评论(0) 推荐(0)
摘要:#include <QApplication> #include <QWidget> #include <QPainter> #include <QPolygonF> #include <QPoint> #include <QMouseEvent> #include <QMessageBox> cl 阅读全文
posted @ 2024-12-29 23:59 西北逍遥 阅读(95) 评论(0) 推荐(0)
摘要:Qt VTK加载openfoam计算结果.foam文件。 #include <QApplication> #include <QDebug> #include "qvtkopenglwidget.h" #include <vtkSmartPointer.h> #include <vtkGeneric 阅读全文
posted @ 2024-11-28 20:10 西北逍遥 阅读(106) 评论(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 西北逍遥 阅读(526) 评论(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 西北逍遥 阅读(30) 评论(0) 推荐(0)
摘要:QByteArray arr1 = QByteArray::fromHex("000000A1000000B2000005DC00000000000000900000000000000000000000000000000100000020000000210000000100000000001748C 阅读全文
posted @ 2024-09-27 10:49 西北逍遥 阅读(132) 评论(0) 推荐(0)
摘要:#include <QApplication> #include <QFileDialog> #include <QFile> #include <QTextStream> #include <QMessageBox> void saveFileWithDialog() { QString file 阅读全文
posted @ 2024-09-10 10:14 西北逍遥 阅读(95) 评论(0) 推荐(0)
摘要:if (tcpSocketObj->state()==QAbstractSocket::SocketState::ConnectedState) { qDebug() << "send data:"<<dataStr; tcpSocketObj->write(dataStr.toUtf8()); } 阅读全文
posted @ 2024-08-17 22:49 西北逍遥 阅读(36) 评论(0) 推荐(0)
摘要:在Qt中,QTcpSocket 类用于TCP网络编程,它提供了丰富的接口来管理TCP连接。要判断 QTcpSocket 的连接状态,可以使用 state() 方法,该方法返回一个 QAbstractSocket::SocketState 枚举值,表示当前的连接状态。 以下是一些常见的连接状态及其对应 阅读全文
posted @ 2024-08-14 21:52 西北逍遥 阅读(785) 评论(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 西北逍遥 阅读(268) 评论(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 西北逍遥 阅读(57) 评论(0) 推荐(0)
摘要:CD实验 Qt环境 下载 Qt5.12 https://download.qt.io/archive/qt/ ######################## 阅读全文
posted @ 2024-06-13 22:56 西北逍遥 阅读(128) 评论(0) 推荐(0)

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