#include "m_widget.h"
#include "ui_m_widget.h"
M_Widget::M_Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::M_Widget)
{
ui->setupUi(this);
// ui->widget->setAlternatingRowColors(true);
// ui->widget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
// ui->widget->horizontalHeader()->setStretchLastSection(true);
//setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
//ui->widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
layout()->setMargin(0);
layout()->setContentsMargins(0, 0, 0, 0);
// setWindowFlags(Qt::SubWindow);
// showFullScreen();
// ui->widget->setWindowFlags(Qt::SubWindow);
// ui->widget->showFullScreen();
// adjustSize();
// ui->widget->adjustSize();
QChart* chart = new QChart();
AxY = new QValueAxis();
AxX = new QValueAxis();
line = new QLineSeries();
// 将系列添加到图表
chart->addSeries(line);
chart->setTheme(QtCharts::QChart::ChartThemeBrownSand);
//mAxX->setTitleText(QString(tr("ImageNumber")));
//mAxY->setTitleText(QString(tr("ReadRate(%)")));
chart->addAxis(AxY, Qt::AlignLeft);
chart->addAxis(AxX, Qt::AlignBottom);
line->attachAxis(AxY);
line->attachAxis(AxX);
//突出曲线上的点
line->setPointsVisible(true);
//图例
QLegend *mlegend = chart->legend();
mlegend->detachFromChart();
mlegend->setGeometry(QRectF(25,0,100,100));
//mlegend->setAlignment(Qt::AlignTop);
//chart->legend()->setBackgroundVisible(true);
//mlegend->setAlignment();
//mlegend->setVisible(false);
// 将图表绑定到视图 weiget 为 QChartView
//隐藏背景
//chart->setBackgroundVisible(false);
//设置外边界全部为0
chart->layout()->setContentsMargins(0, 0, 0, 0);
//设置内边界全部为0
chart->setMargins(QMargins(0, 0, 0, 0));
//设置背景区域无圆角
chart->setBackgroundRoundness(0);
ui->widget->setChart(chart);
}
M_Widget::~M_Widget()
{
delete ui;
}
void M_Widget::timerEvent(QTimerEvent *)
{
}
QLineSeries* M_Widget::getline(){
return line;
}
QValueAxis* M_Widget::getAxY(){
return AxY;
}
QValueAxis* M_Widget::getAxX(){
return AxX;
}

manylinux
- 粉丝: 5100
最新资源
- Chinese safety prompts for evaluating and improving the safety of LLMs. 中文安全prompts,用于评估和提升大模型的安全性
- WorldBlueSky-JavaDocS-22484-1755764829860.zip
- 《解构大语言模型:从线性回归到通用人工智能》配套代码
- SQL Server管理入门与实践
- LangChat: Java LLMs/AI Project, Supports Multi AI Providers( Gitee AI/ 智谱清言 / 阿里通义 / 百度千帆 / DeepSeek
- 大模型具身智能比赛-机器人控制端
- 计算机系统基础课程实验项目之数据实验室-位操作与整数浮点数表示深度解析-用于帮助学生理解计算机底层数据表示和位运算原理-通过修改bitsc文件完成指定位操作函数-使用dlc编译器.zip
- PHP, Apache, MySQL Web Development入门指南
- 《解构大语言模型:从线性回归到通用人工智能》配套代码
- 《解析大语言模型:从线性回归到通用人工智能》配套代码 《剖析大语言模型:从线性回归到通用人工智能》配套代码 《拆解大语言模型:从线性回归到通用人工智能》配套代码
- 大数据如何改变我们的生活与工作
- 个人关于大模型的记忆宝藏
- 个人关于大模型的记忆宝藏
- 数据库基础与应用:从理论到实践
- 基于大语言模型(LLM)和多智能体(Multi-Agent),探究AI写小说能力的边界
- 网络安全分析与监控平台安全防护关键技术.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


