QT中窗口自绘制效果展示

项目中需要使用QT进行窗口自绘,前期先做一下技术探索,参考相关资料代码熟悉流程。本着代码是最好的老师原则,在此记录一下。

目录

1.运行效果

2.代码结构

3.具体代码


1.运行效果

2.代码结构

3.具体代码

myspeed.pro

QT       += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgetsCONFIG += c++17# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0SOURCES += \drawdialog.cpp \main.cpp \meter1.cpp \meter2.cppHEADERS += \drawdialog.h \meter1.h \meter2.h# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

drawdialog.h

#include <QDialog>class DrawDialog : public QDialog
{Q_OBJECTpublic:explicit DrawDialog(QWidget *parent = 0);void mousePressEvent(QMouseEvent *event);void mouseMoveEvent(QMouseEvent *event);void paintEvent(QPaintEvent *event) ;void keyPressEvent( QKeyEvent * event );
private:QPoint m_CurrentPos;
};

meter1.h

#ifndef METER1_H
#define METER1_H#include <QWidget>
#include <QMouseEvent>// 仪表盘开发参考博客
// https://blog.csdn.net/yyz_1987/article/details/126958420#comments_29151980
class MyMeter1 : public QWidget
{Q_OBJECTpublic:MyMeter1(QWidget *parent = 0);~MyMeter1();void setValue(double val);protected:void paintEvent(QPaintEvent *);void drawCrown(QPainter *painter);void drawBackground(QPainter *painter);void drawScale(QPainter *painter);void drawScaleNum(QPainter *painter);void drawTitle(QPainter *painter);void drawIndicator(QPainter *painter);void drawNumericValue(QPainter *painter);protected:void mouseMoveEvent(QMouseEvent *event);void mousePressEvent(QMouseEvent *event);void mouseReleaseEvent(QMouseEvent *event);private:QPoint mousePoint;bool mouse_press;private:QColor m_background;QColor m_foreground;int m_maxValue;int m_minValue;int m_startAngle;int m_endAngle;int m_scaleMajor;int m_scaleMinor;double m_value;int m_precision;QTimer *m_updateTimer;QString m_units;QString m_title;public Q_SLOTS:void UpdateAngle();private:};#endif // METER1_H

meter2.h

#ifndef METER2_H
#define METER2_H#include <QWidget>class MyMeter2 : public QWidget
{Q_OBJECTpublic:MyMeter2(QWidget *parent = nullptr);~MyMeter2();void paintEvent(QPaintEvent *event);void timerEvent(QTimerEvent *e);private:void drawFrame(QPainter *painter);void drawScale(QPainter *painter);void drawScaleNum(QPainter *painter);void drawPointer(QPainter *painter);void drawSpeed(QPainter *painter);void drawUnit(QPainter *painter);int speed;int time_id;int status;qreal m_angle;QColor m_foreground;int m_maxValue;int m_minValue;int m_startAngle;int m_endAngle;int m_scaleMajor;int m_scaleMinor;double m_value;int m_precision;//QTimer *m_updateTimer;QString m_units;QString m_title;};
#endif // METER2_H

drawdialog.cpp

#include "drawdialog.h"
#include <QWidget>
#include <QMouseEvent>
#include <QPainter>DrawDialog::DrawDialog(QWidget *parent) : QDialog(parent){//让程序无边框setWindowFlags( Qt::FramelessWindowHint );//让程序背景透明setAttribute(Qt::WA_TranslucentBackground, true);
}void DrawDialog::mousePressEvent(QMouseEvent *event)
{//当鼠标左键按下时,记录当前位置if(event->button() == Qt::LeftButton){m_CurrentPos = event->globalPos() - frameGeometry().topLeft();event->accept();}QDialog::mousePressEvent(event);
}void DrawDialog::mouseMoveEvent(QMouseEvent *event)
{//支持窗体移动if (event->buttons() & Qt::LeftButton){move(event->globalPos() - m_CurrentPos);event->accept();}QDialog::mouseMoveEvent(event);}//绘制图形void DrawDialog::paintEvent(QPaintEvent *event){QPainter painter(this);//反走样painter.setRenderHint(QPainter::Antialiasing,true);painter.setPen( QPen(Qt::green, 2) );painter.setBrush( Qt::blue );QRect rect(10,10,200,260);//绘制一个椭圆painter.drawEllipse(rect);}void DrawDialog::keyPressEvent( QKeyEvent * event )
{//按下esc键时,关闭if(event->key() == Qt::Key_Escape){close();}
}

meter1.cpp

#include "meter1.h"#include <QPainter>// 构造函数
MyMeter1::MyMeter1(QWidget *parent){m_background = Qt::black;m_foreground = Qt::white;m_startAngle = 60;m_endAngle = 60;m_scaleMajor = 10;m_minValue = 0;m_maxValue = 100;m_scaleMajor = 10;//分度m_scaleMinor = 10;m_units = "L/min";m_title = "仪表盘";m_precision = 0;m_value = 0;mouse_press = false;setWindowFlags(Qt::FramelessWindowHint);//无窗体setAttribute(Qt::WA_TranslucentBackground);//背景透明resize(500, 500);}MyMeter1::~MyMeter1()
{}void MyMeter1::setValue(double val)
{m_value = val;
}
//绘制表冠
void MyMeter1::drawCrown(QPainter *painter)
{painter->save();int radius = 100;QLinearGradient lg1(0, -radius, 0, radius);lg1.setColorAt(0, Qt::white); //设置渐变的颜色和路径比例lg1.setColorAt(1, Qt::gray); //只是粗略的颜色,具体的可以参考RGB颜色查询对照表painter->setBrush(lg1); // 创建QBrush对象,把这个渐变对象传递进去:painter->setPen(Qt::NoPen); //边框线无色painter->drawEllipse(-radius, -radius, radius << 1, radius << 1);painter->setBrush(m_background = Qt::black);painter->drawEllipse(-92, -92, 184, 184);painter->restore();
}//绘制刻度数字
void MyMeter1::drawScaleNum(QPainter *painter)
{painter->save();painter->setPen(m_foreground);//m_startAngle是起始角度,m_endAngle是结束角度,m_scaleMajor在一个量程中分成的刻度数double startRad = ( 270-m_startAngle) * (3.14 / 180);double deltaRad = (360 - m_startAngle - m_endAngle) * (3.14 / 180) / m_scaleMajor;double sina,cosa;int x, y;QFontMetricsF fm(this->font());double w, h, tmpVal;QString str;for (int i = 0; i <= m_scaleMajor; i++){sina = sin(startRad - i * deltaRad);cosa = cos(startRad - i * deltaRad);tmpVal = 1.0 * i *((m_maxValue - m_minValue) / m_scaleMajor) + m_minValue;// tmpVal = 50;str = QString( "%1" ).arg(tmpVal);  //%1作为占位符   arg()函数比起 sprintf()来是类型安全的w = fm.size(Qt::TextSingleLine,str).width();h = fm.size(Qt::TextSingleLine,str).height();x = 82 * cosa - w / 2;y = -82 * sina + h / 4;painter->drawText(x, y, str); //函数的前两个参数是显示的坐标位置,后一个是显示的内容,是字符类型""}painter->restore();
}// 绘制刻度线
void MyMeter1::drawScale(QPainter *painter) //绘制刻度线
{painter->save();painter->rotate(m_startAngle);int steps = (m_scaleMajor * m_scaleMinor); //相乘后的值是分的份数double angleStep = (360.0 - m_startAngle - m_endAngle) / steps; //每一个份数的角度// painter->setPen(m_foreground); //m_foreground是颜色的设置// QPen pen = painter->pen(); //第一种方法QPen pen ;pen.setColor(Qt::green); //推荐使用第二种方式for (int i = 0; i <= steps; i++){if (i % m_scaleMinor == 0)//整数刻度显示加粗{pen.setWidth(1); //设置线宽painter->setPen(pen); //使用面向对象的思想,把画笔关联上画家。通过画家画出来painter->drawLine(0, 62, 0, 72); //两个参数应该是两个坐标值}else{pen.setWidth(0);painter->setPen(pen);painter->drawLine(0, 67, 0, 72);}painter->rotate(angleStep);}painter->restore();
}void MyMeter1::drawTitle(QPainter *painter)
{painter->save();painter->setPen(m_foreground);//painter->setBrush(m_foreground);QString str(m_title); //显示仪表的功能QFontMetricsF fm(this->font());double w = fm.size(Qt::TextSingleLine,str).width();painter->drawText(-w / 2, -30, str);painter->restore();
}// 显示的单位,与数值
void MyMeter1::drawNumericValue(QPainter *painter)
{QString str = QString("%1 %2").arg(m_value, 0, 'f', m_precision).arg(m_units);QFontMetricsF fm(font());double w = fm.size(Qt::TextSingleLine,str).width();painter->setPen(m_foreground);painter->drawText(-w / 2, 42, str);
}void MyMeter1::UpdateAngle()
{update();
}// 绘制表针,和中心点
void MyMeter1::drawIndicator(QPainter *painter)
{painter->save();QPolygon pts;pts.setPoints(3, -2, 0, 2, 0, 0, 60);	/* (-2,0)/(2,0)/(0,60) *///第一个参数是 ,坐标的个数。后边的是坐标painter->rotate(m_startAngle);double degRotate = (360.0 - m_startAngle - m_endAngle) / (m_maxValue - m_minValue)*(m_value - m_minValue);//画指针painter->rotate(degRotate);  //顺时针旋转坐标系统QRadialGradient haloGradient(0, 0, 60, 0, 0);  //辐射渐变haloGradient.setColorAt(0, QColor(60, 60, 60));haloGradient.setColorAt(1, QColor(160, 160, 160)); //灰painter->setPen(Qt::white); //定义线条文本颜色  设置线条的颜色painter->setBrush(haloGradient);//刷子定义形状如何填满 填充后的颜色painter->drawConvexPolygon(pts); //这是个重载函数,绘制多边形。painter->restore();//画中心点QColor niceBlue(150, 150, 200);QConicalGradient coneGradient(0, 0, -90.0);  //角度渐变coneGradient.setColorAt(0.0, Qt::darkGray);coneGradient.setColorAt(0.2, niceBlue);coneGradient.setColorAt(0.5, Qt::white);coneGradient.setColorAt(1.0, Qt::darkGray);painter->setPen(Qt::NoPen);  //没有线,填满没有边界painter->setBrush(coneGradient);painter->drawEllipse(-5, -5, 10, 10);
}// 重绘函数
void MyMeter1 ::paintEvent(QPaintEvent *)
{int width=this->width();int height=this->height();QPainter painter(this);//一个类中的this表示一个指向该类自己的指针painter.setRenderHint(QPainter::Antialiasing);  /* 使用反锯齿(如果可用) */painter.translate(width/2, height/2);   /* 坐标变换为窗体中心 */int side = qMin(width, height);painter.scale(side / 200.0, side / 200.0);      /* 比例缩放 */drawCrown(&painter);                                 /* 画表盘边框 */drawScaleNum(&painter);                          /* 画刻度数值值 */drawScale(&painter);                                 /* 画刻度线 */drawTitle(&painter);                                 /* 画单位 */drawNumericValue(&painter);                      /* 画数字显示 */drawIndicator(&painter);                             /* 画表针 */}void MyMeter1::mousePressEvent(QMouseEvent *event){if( (event->button() == Qt::LeftButton) ){mouse_press = true;mousePoint = event->globalPos() - this->pos();//        event->accept();}else if(event->button() == Qt::RightButton){//如果是右键this->close();}
}void MyMeter1::mouseMoveEvent(QMouseEvent *event)
{//    if(event->buttons() == Qt::LeftButton){  //如果这里写这行代码,拖动会有点问题if(mouse_press){move(event->globalPos() - mousePoint);
//        event->accept();}
}void MyMeter1::mouseReleaseEvent(QMouseEvent *event)
{mouse_press = false;
}

meter2.cpp

#include "meter2.h"#include <QPainter>
#include <QBrush>
#include <QLabel>
#include <QTimerEvent>
#include <QLinearGradient>
#include <QFont>#include <QtMath>MyMeter2::MyMeter2(QWidget *parent): QWidget(parent)
{//resize(800, 480);//setWindowTitle("test");m_foreground = Qt::red;//Qt::black;speed = 0;status = 0;m_startAngle = 45;m_endAngle = 45;m_minValue = 0;m_maxValue = 100;m_scaleMajor = 10;//分度m_scaleMinor = 10;m_units = "KM/H";m_title = "My Speed";m_precision = 0;m_value = 0;m_angle = (qreal)270/(m_maxValue-1);//setWindowFlags(Qt::FramelessWindowHint);//无窗体//setAttribute(Qt::WA_TranslucentBackground);//背景透明time_id = this->startTimer(50);
}MyMeter2::~MyMeter2()
{
}void MyMeter2::paintEvent(QPaintEvent *event)
{int width=this->width();int height=this->height();QPainter painter(this);painter.translate(width/2, height/2);int side = qMin(width, height);painter.scale(side / 200.0, side / 200.0);      /* 比例缩放 */drawFrame(&painter);drawScale(&painter);                                 /* 画刻度线 */drawScaleNum(&painter);                          /* 画刻度数值值 */drawUnit(&painter);drawPointer(&painter);drawSpeed(&painter);
}void MyMeter2::drawFrame(QPainter *painter)
{painter->save();// 半径100int radius = 100;painter->setBrush(QBrush(QColor(0, 255, 0, 255), Qt::SolidPattern));painter->drawArc(-radius, -radius, radius<<1, radius<<1, -135*16, -270*16);painter->restore();}// 绘制刻度线
void MyMeter2::drawScale(QPainter *painter)
{painter->save();painter->rotate(m_startAngle);int steps = (m_scaleMajor * m_scaleMinor); //相乘后的值是分的份数double angleStep = (360.0 - m_startAngle - m_endAngle) / steps; //每一个份数的角度// painter->setPen(m_foreground); //m_foreground是颜色的设置// QPen pen = painter->pen(); //第一种方法QPen pen ;pen.setColor(m_foreground); //推荐使用第二种方式for (int i = 0; i <= steps; i++){if (i % m_scaleMinor == 0)//整数刻度显示加粗{pen.setWidth(1); //设置线宽painter->setPen(pen); //使用面向对象的思想,把画笔关联上画家。通过画家画出来painter->drawLine(0, 90, 0, 100); //两个参数应该是两个坐标值}else{pen.setWidth(0);painter->setPen(pen);painter->drawLine(0, 95, 0, 100);}painter->rotate(angleStep);}painter->restore();
}
// 绘制刻度
void MyMeter2::drawScaleNum(QPainter *painter)
{painter->save();painter->setPen(m_foreground);//m_startAngle是起始角度,m_endAngle是结束角度,m_scaleMajor在一个量程中分成的刻度数double startRad = ( 270-m_startAngle) * (3.14 / 180);double deltaRad = (360 - m_startAngle - m_endAngle) * (3.14 / 180) / m_scaleMajor;double sina,cosa;int x, y;QFontMetricsF fm(this->font());double w, h, tmpVal;QString str;for (int i = 0; i <= m_scaleMajor; i++){sina = sin(startRad - i * deltaRad);cosa = cos(startRad - i * deltaRad);tmpVal = 1.0 * i *((m_maxValue - m_minValue) / m_scaleMajor) + m_minValue;// tmpVal = 50;str = QString( "%1" ).arg(tmpVal);  //%1作为占位符   arg()函数比起 sprintf()来是类型安全的w = fm.size(Qt::TextSingleLine,str).width();h = fm.size(Qt::TextSingleLine,str).height();x = 82 * cosa - w / 2;y = -82 * sina + h / 4;painter->drawText(x, y, str); //函数的前两个参数是显示的坐标位置,后一个是显示的内容,是字符类型""}painter->restore();
}void MyMeter2::drawPointer(QPainter *painter)
{int radius = 100;QPoint point[4] = {QPoint(0, 10),QPoint(-10, 0),QPoint(0, -80),QPoint(10, 0),};painter->save();QLinearGradient linear;linear.setStart(-radius, -radius);linear.setFinalStop(radius<<1, radius<<1);linear.setColorAt(0, QColor(0, 255, 255, 0));linear.setColorAt(1, QColor(0, 255, 255, 255));painter->setPen(Qt::NoPen);painter->setBrush(linear);painter->drawPie(-radius, -radius, radius<<1, radius<<1, 225 * 16, -(m_angle * this->speed) * 16);painter->restore();painter->save();painter->setBrush(QBrush(QColor(0, 0, 0, 255), Qt::SolidPattern));painter->rotate(-135 + this->speed * m_angle);painter->drawPolygon(point, 4);painter->restore();
}void MyMeter2::drawSpeed(QPainter *painter)
{painter->save();painter->setPen(QColor("#0"));//  绘制速度QFont font("Times", 10, QFont::Bold);font.setBold(true);font.setPixelSize(46);painter->setFont(font);painter->drawText(-60, 0, 120, 92, Qt::AlignCenter, QString::number(speed));painter->restore();
}void MyMeter2::drawUnit(QPainter *painter)
{QString str = QString("%1").arg(m_units);QFontMetricsF fm(font());double w = fm.size(Qt::TextSingleLine,str).width();painter->setPen(m_foreground);painter->drawText(-w / 2, 82, str);
}void MyMeter2::timerEvent(QTimerEvent *e)
{int timerId = e->timerId();if(this->time_id == timerId) {if(this->status == 0) {this->speed += 1;if(this->speed >= m_maxValue)this->status = 1;}else {this->speed -= 1;if(this->speed <= 0)this->status = 0;}this->update();}
}

main.cpp

#include "mainwindow.h"
#include "meter1.h"
#include "meter2.h"
#include "drawdialog.h"
#include <QApplication>int main(int argc, char *argv[])
{QApplication a(argc, argv);MyMeter1 w1;w1.setValue(33.12);w1.show();MyMeter2 w2;w2.show();DrawDialog w3;w3.show();return a.exec();
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/113633.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

陪诊小程序|陪诊小程序关爱健康,无忧陪伴

随着社会发展和人们生活水平的提高&#xff0c;健康问题成为人们关注的焦点。然而&#xff0c;在就医过程中&#xff0c;许多患者常常感到孤独和无助&#xff0c;缺乏得到家人陪伴的温暖与安慰。为了解决这一问题&#xff0c;我们公司开发了一款创新的陪诊小程序软件&#xff0…

Pandas数据处理分析系列2-数据如何导入

Pandas Excel 数据导入 Pandas库提供了一组强大的输入/输出(I/O)函数(简称为:I/O API),用于读取和写入各种数据格式,目前已支持常见的多种外数据格式。 Pandas 常见读取方法如下表: 可以看出,在使用Pandas 读取数据格式文件时,只需一个方法则可,不同的方法参数, 可…

【C++学习笔记】内联函数

1. 概念 以inline修饰的函数叫做内联函数&#xff0c;编译时C编译器会在调用内联函数的地方展开&#xff0c;没有函数调 用建立栈帧的开销&#xff0c;内联函数提升程序运行的效率。 如果在上述函数前增加inline关键字将其改成内联函数&#xff0c;在编译期间编译器会用函数…

SpringCloud学习笔记(上):服务注册与发现:Eureka、Zookeeper、Consul+负载均衡服务调用:Ribbon

壹、零基础 一、微服务架构零基础理论入门 SpringCloud分布式微服务架构的一站式解决方案&#xff0c;是多种微服务架构落地技术的集合体&#xff0c;俗称微服务全家桶。 二、从2.2.x和H版开始说起 springboot版本选择&#xff1a; git源码地址&#xff1a;https://github.…

【超详细】CentOS 7安装MySQL 5.7【安装及密码配置、字符集配置、远程连接配置】

准备工作&#xff1a;CentOS 7系统&#xff0c;并确保可以联通网络 1、获取MySQL 5.7 Community Repository软件包 注意&#xff1a;这里使用的是root用户身份。 wget https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm2、安装软件包 rpm -ivh mysql5…

SoftPlc on docker 测试

Swagger 返回的数据 为 Base64编码&#xff0c;要查看 用下面的在线工具转换HEX Base64 to Hex | Base64 Decode | Base64 Converter | Base64 软件主页https://github.com/fbarresi/SoftPlc 安装 docker stop softplc docker rm softplc docker pull fbarresi/softplc:lat…

全网最丑焊锡教程(仅排针焊接心得)

一直以来玩各种开发板&#xff0c;焊接水平太差始终是阻碍我买性价比高的板子的最大原因。淘宝上好多芯片搭载上肥猪流板子是不包排针焊接的。终于下定决心要克服这个困难。不过&#xff0c;只是会焊接排针在高手面前最好不要说自己会焊锡&#xff0c;这应该是两码事。 首先上…

高级软件工程师职业发展路径及适学人群

大数据赋能产业&#xff0c;改变人与场景的交互方式&#xff0c;随着大数据在各行各业融合应用的不断深化&#xff0c;预计2020年中国大数据市场市值将突破10000亿元。 未来发展&#xff0c;大数据应用范围越加宽广&#xff0c;包括&#xff1a;新零售、旅游、广告、电商…

【javascript】内部引入与外部引入javascript

创建a.html 内部引入&#xff1a; 外部引入&#xff1a; 创建a.js 注意&#xff1a; 我这里的a.js和a.html是放在同一个目录下&#xff0c;如果a.js放在js的目录下&#xff0c;a.html 调用a.js的时候 <script src"/js/a.js"></script>

【疯狂Java讲义】Java学习记录(IO流)

IO流 IO&#xff1a;Input / Output 完成输入 / 输出 应用程序运行时——数据在内存中 ←→ 把数据写入硬盘&#xff08;磁带&#xff09; 内存中的数据不可持久保存 输入&#xff1a;从外部存储器&#xff08;硬盘、磁带、U盘&#…

BERT变体(1):ALBERT、RoBERTa、ELECTRA、SpanBERT

Author:龙箬 Computer Application Technology Change the World with Data and Artificial Intelligence ! CSDNweixin_43975035 天下之大&#xff0c;虽离家万里&#xff0c;何处不可往&#xff01;何事不可为&#xff01; 1. ALBERT \qquad ALBERT的英文全称为A Lite versio…

C# 文件 校验:MD5、SHA1、SHA256、SHA384、SHA512、CRC32、CRC64

文件 校验 算法:MD5、SHA1、SHA256、SHA384、SHA512、CRC32、CRC64 (免费) 编程语言:C# 功能:文件 哈希 属性 校验算法:MD5、SHA1、SHA256、SHA384、SHA512、CRC32、CRC64。 下载(免费):https://download.csdn.net/download/polloo2012/88450148 本程序 File Pro…

工程监测仪器振弦传感器信号转换器在桥梁安全监测中的重要性

工程监测仪器振弦传感器信号转换器在桥梁安全监测中的重要性 桥梁是人类社会建设过程中最重要的交通基础设施之一&#xff0c;对于保障人民出行、促进经济发展具有极其重要的作用。由于桥梁结构在长期使用过程中受到环境因素和负荷的影响&#xff0c;会逐渐发生变形和损伤&…

python读写.pptx文件

1、读取PPT import pptx pptpptx.Presentation(rC:\Users\user\Documents\\2.pptx) # ppt.save(rC:\Users\user\Documents\\1.pptx) # slideppt.slides.add_slide(ppt.slide_layouts[1])# 读取所有幻灯片上的文字 for slide in ppt.slides:for shape in slide.shapes:if shape…

vue ref和$refs获取dom元素

vue ref和$refs获取dom元素 **创建 工程&#xff1a; H:\java_work\java_springboot\vue_study ctrl按住不放 右键 悬着 powershell H:\java_work\java_springboot\js_study\Vue2_3入门到实战-配套资料\01-随堂代码素材\day04\准备代码\14-ref和$refs获取dom对象 vue --ve…

【OpenVINO】行人摔倒检测 — 基于 OpenVINO C# API 部署PP-Human-上篇

行人摔倒检测 — 基于 OpenVINO C# API 部署PP-Human 1. 英特尔开发套件1.1 OpenVINO1.2 AIxBoard 介绍产品定位产品参数AI推理单元 2. PaddleDetection实时行人分析工具PP-Human3. 预测模型获取与转换3.1 PP-YOLOE行人跟踪模型介绍模型下载与转换&#xff08;1&#xff09;Pad…

2023年传媒行业中期策略 AIGC从三个不同层次为内容产业赋能

基本面和新题材共振&#xff0c;推动传媒互联网行情上涨 AIGC 概念带动&#xff0c;传媒板块领涨 A 股 2023 年第一个交易日&#xff08;1 月 3 日&#xff09;至 6 月 2 日&#xff0c;申万传媒指数区间涨幅高达 48.38%&#xff0c;同时期沪深 300 跌幅为 0.25%&#xff0c;…

centos7 部署oracle完整教程(命令行)

centos7 部署oracle完整教程&#xff08;命令行&#xff09; 一. centos7安装oracle1.查看Swap分区空间&#xff08;不能小于2G&#xff09;2.修改CentOS系统标识 (由于Oracle默认不支持CentOS)2.1.删除CentOS Linux release 7.9.2009 (Core)&#xff08;快捷键dd&#xff09;&…

【公众号开发】图像文字识别 · 模板消息推送 · 素材管理 · 带参数二维码的生成与事件的处理

【公众号开发】&#xff08;4&#xff09; 文章目录 【公众号开发】&#xff08;4&#xff09;1. 图像文字识别功能1.1 百度AI图像文字识别接口申请1.2 查看文档学习如何调用百度AI1.3 程序开发1.3.1 导入依赖&#xff1a;1.3.2 公众号发来post请求格式1.3.3 对image类型的消息…

Python---死循环概念---while True

在编程中一个靠自身控制无法终止的程序称为“死循环”。 在Python中&#xff0c;我们也可以使用while True来模拟死循环&#xff1a; 代码&#xff1a; while True: print(每天进步一点点) 图示 应用&#xff1a; 比如&#xff0c;在测试里面&#xff0c;自动化测试用例…