Qt编程-QTableView同时冻结行和列

news2024/10/5 14:21:50

前言

Qt编程-QTableView同时冻结行和列。如题,先看效果是不是你需要的。网上找到的代码片段要么不全要么不是想要的。如果你只需要需要冻结行或冻结列,请看上篇博客 Qt编程-QTableView冻结行或冻结列或冻结局部单元格 ,代码更少一些。

同时冻结行列带表头:
在这里插入图片描述

同时冻结行列不带表头:
在这里插入图片描述

原理

冻结行或者冻结列原理: 使用3个tableview ,内容一样,最上层tableview显示交叉部分内容,中间层显示冻结的行tableview和冻结列tableview 把非冻结的内容隐藏掉,下层显示全部内容 下层tableview正常滑动就有冻结行或者列的效果了。

代码

代码改造来自 Qt自带例子 。可通过宏变量FREEZE_COL和FREEZE_ROW控制冻结行或冻结列,宏变量TABLE_HEAD控制表头显示。完整工程代码下载。

主要代码如下:

freezetablewidget.h

#ifndef FREEZETABLEWIDGET_H
#define FREEZETABLEWIDGET_H

#include <QTableView>

//! [Widget definition]
class FreezeTableWidget : public QTableView {
    Q_OBJECT

public:
    FreezeTableWidget(QAbstractItemModel * model);
    ~FreezeTableWidget();


protected:
    void resizeEvent(QResizeEvent *event) override;
    QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
    void scrollTo (const QModelIndex & index, ScrollHint hint = EnsureVisible) override;

private:
    QTableView *frozenCroTableView; //冻结行冻结列交叉部分的TableView
    QTableView *frozenColTableView; //冻结列的TableView
    QTableView *frozenRowTableView; //冻结行的TableView
    void initCroTable();
    void initColTable();
    void initRowTable();
    void updateFrozenCroTableGeometry();
    void updateFrozenColTableGeometry();
    void updateFrozenRowTableGeometry();


private slots:
    void updateSectionWidth(int logicalIndex, int oldSize, int newSize);
    void updateSectionHeight(int logicalIndex, int oldSize, int newSize);
private:
    //冻结的行列数
    int m_iFreezeCols = 3;
    int m_iFreezeRows = 3;
};
//! [Widget definition]
#endif // FREEZETABLEWIDGET_H

freezetablewidget.cpp

#include "freezetablewidget.h"

#include <QScrollBar>
#include <QHeaderView>
#include <QDebug>

#define FREEZE_COL 1 //冻结列开关
#define FREEZE_ROW 1 //冻结行开关
#define TABLE_HEAD 0 //表头是否显示

//! [constructor]
FreezeTableWidget::FreezeTableWidget(QAbstractItemModel * model)
{
    /*
      冻结行或者冻结列 原理:实质上有2个tableview
            FreezeTableWidget 这个正常显示所有的表格数据
            frozenColTableView 这个表格放在FreezeTableWidget的上面 只显示 冻结的列,这样下面的 FreezeTableWidget 正常滑动就有冻结列的效果了。
      同时冻结行列 原理类似,不过是3个tableview,冻结行和冻结列的tableview交叉部分单独作为一个tableview要放在最顶层,下面是冻结行和冻结列的tableview 最下面是 FreezeTableWidget的tableview。
     */
    verticalHeader()->setVisible(TABLE_HEAD);
    horizontalHeader()->setVisible(TABLE_HEAD);

    setModel(model);

#if (FREEZE_COL && FREEZE_ROW)
    frozenCroTableView = new QTableView(this);
    initCroTable();
#endif

#if FREEZE_COL
    frozenColTableView = new QTableView(this);
    initColTable();
#endif

#if FREEZE_ROW
    frozenRowTableView = new QTableView(this);
    initRowTable();
#endif


    //connect the headers and scrollbars of both tableviews together
#if FREEZE_COL
    connect(horizontalHeader(),&QHeaderView::sectionResized, this,
            &FreezeTableWidget::updateSectionWidth);
#endif
#if FREEZE_ROW
    connect(verticalHeader(),&QHeaderView::sectionResized, this,
            &FreezeTableWidget::updateSectionHeight);
#endif

    //LUpdate
    //冻结列,纵向滚动条可正常滑动
#if FREEZE_COL
    connect(frozenColTableView->verticalScrollBar(), &QAbstractSlider::valueChanged,
            verticalScrollBar(), &QAbstractSlider::setValue);
    connect(verticalScrollBar(), &QAbstractSlider::valueChanged,
            frozenColTableView->verticalScrollBar(), &QAbstractSlider::setValue);
#endif
    //冻结行,横向向滚动条可正常滑动
#if FREEZE_ROW
    connect(frozenRowTableView->horizontalScrollBar(), &QAbstractSlider::valueChanged,
            horizontalScrollBar(), &QAbstractSlider::setValue);
    connect(horizontalScrollBar(), &QAbstractSlider::valueChanged,
            frozenRowTableView->horizontalScrollBar(), &QAbstractSlider::setValue);
#endif

}
//! [constructor]

FreezeTableWidget::~FreezeTableWidget()
{
#if FREEZE_COL
    delete frozenColTableView;
#endif
#if FREEZE_ROW
    delete frozenRowTableView;
#endif
#if FREEZE_COL && FREEZE_ROW
    delete frozenCroTableView;
#endif
}

//! [init part1]
void FreezeTableWidget::initCroTable()
{
    frozenCroTableView->setModel(model());
    frozenCroTableView->setObjectName("frozenCroTableView");
    frozenCroTableView->setFocusPolicy(Qt::NoFocus);
    frozenCroTableView->verticalHeader()->setFixedWidth(verticalHeader()->width());
    frozenCroTableView->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
    frozenCroTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
#if !TABLE_HEAD
    frozenCroTableView->horizontalHeader()->hide();
    frozenCroTableView->verticalHeader()->hide();
#endif

    viewport()->stackUnder(frozenCroTableView);
    //! [init part1]

    //! [init part2]
    frozenCroTableView->setStyleSheet("#frozenCroTableView{ border: none;"
                                      "background-color: #AEC8FF;"
                                      "selection-background-color: #999}"); //for demo purposes
    frozenCroTableView->setSelectionModel(selectionModel());

    //LUpdate
    //隐藏冻结列以外的数据
    for (int col = m_iFreezeCols; col < model()->columnCount(); ++col)
        frozenCroTableView->setColumnHidden(col, true);

    for(int i = 0; i < m_iFreezeCols; i++)
    {
        frozenCroTableView->setColumnWidth(i, columnWidth(0));
    }
    //隐藏冻结行以外的行的数据
    for (int row = m_iFreezeRows; row < model()->rowCount(); ++row)
        frozenCroTableView->setRowHidden(row, true);
    for(int i = 0; i < m_iFreezeRows; i++)
    {
        frozenCroTableView->setRowHeight(i, rowHeight(0));
    }

    frozenCroTableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenCroTableView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenCroTableView->show();

    updateFrozenCroTableGeometry();

    setHorizontalScrollMode(ScrollPerPixel);
    setVerticalScrollMode(ScrollPerPixel);
    frozenCroTableView->setVerticalScrollMode(ScrollPerPixel);
    frozenCroTableView->setHorizontalScrollMode(ScrollPerPixel);
}

//! [init part1]
void FreezeTableWidget::initColTable()
{
    frozenColTableView->setModel(model());
    frozenColTableView->setObjectName("frozenColTableView");
    frozenColTableView->setFocusPolicy(Qt::NoFocus);
    frozenColTableView->verticalHeader()->setFixedWidth(verticalHeader()->width());
    frozenColTableView->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
    frozenColTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
#if !TABLE_HEAD
    frozenColTableView->horizontalHeader()->hide();
    frozenColTableView->verticalHeader()->hide();
#endif

#if FREEZE_COL && FREEZE_ROW
    frozenColTableView->stackUnder(frozenCroTableView);
#else
    viewport()->stackUnder(frozenColTableView);
#endif

    //! [init part1]

    //! [init part2]
    frozenColTableView->setStyleSheet("#frozenColTableView{ border: none;"
                                      "background-color: #8EDE21;"
                                      "selection-background-color: #999}"); //for demo purposes
    frozenColTableView->setSelectionModel(selectionModel());

    //LUpdate
    //隐藏冻结列以外的数据
    for (int col = m_iFreezeCols; col < model()->columnCount(); ++col)
        frozenColTableView->setColumnHidden(col, true);

    for(int i = 0; i < m_iFreezeCols; i++)
    {
        frozenColTableView->setColumnWidth(i, columnWidth(0));
    }

    frozenColTableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenColTableView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenColTableView->show();

    updateFrozenColTableGeometry();

    setHorizontalScrollMode(ScrollPerPixel);
    setVerticalScrollMode(ScrollPerPixel);
    frozenColTableView->setVerticalScrollMode(ScrollPerPixel);
    frozenColTableView->setHorizontalScrollMode(ScrollPerPixel);
}

void FreezeTableWidget::initRowTable()
{
    frozenRowTableView->setModel(model());
    frozenRowTableView->setObjectName("frozenRowTableView");
    frozenRowTableView->setFocusPolicy(Qt::NoFocus);
    frozenRowTableView->verticalHeader()->setFixedWidth(verticalHeader()->width());
    frozenRowTableView->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
    frozenRowTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
#if !TABLE_HEAD
    frozenRowTableView->horizontalHeader()->hide();
    frozenRowTableView->verticalHeader()->hide();
#endif

#if FREEZE_COL
    frozenRowTableView->stackUnder(frozenColTableView);
#else
    viewport()->stackUnder(frozenRowTableView);
#endif

    //! [init part1]

    //! [init part2]
    frozenRowTableView->setStyleSheet("#frozenRowTableView{ border: none;"
                                      "background-color: #f44c46;"
                                      "selection-background-color: #999}"); //for demo purposes
    frozenRowTableView->setSelectionModel(selectionModel());

    //LUpdate
    //隐藏冻结行以外的行的数据
    for (int row = m_iFreezeRows; row < model()->rowCount(); ++row)
        frozenRowTableView->setRowHidden(row, true);
    for(int i = 0; i < m_iFreezeRows; i++)
    {
        frozenRowTableView->setRowHeight(i, rowHeight(0));
    }

    frozenRowTableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenRowTableView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    frozenRowTableView->show();

    updateFrozenRowTableGeometry();

    setHorizontalScrollMode(ScrollPerPixel);
    setVerticalScrollMode(ScrollPerPixel);
    frozenRowTableView->setVerticalScrollMode(ScrollPerPixel);
    frozenRowTableView->setHorizontalScrollMode(ScrollPerPixel);
}
//! [init part2]


//! [sections]
void FreezeTableWidget::updateSectionWidth(int logicalIndex, int /* oldSize */, int newSize)
{
    qDebug() << "updateSectionWidth" << logicalIndex << newSize;
    //LUpdate
#if FREEZE_COL
    if (logicalIndex == m_iFreezeCols-1){

        int width = 0;
        for(int i = 0; i< m_iFreezeCols-1; i++)
        {
            width += columnWidth(i);
        }

        for(int i = 0; i< m_iFreezeCols; i++)
        {
            frozenColTableView->setColumnWidth(i, (newSize+width)/m_iFreezeCols);
        }
        updateFrozenColTableGeometry();
    }
#else
    frozenColTableView->setColumnWidth(logicalIndex, newSize);
#endif
}

void FreezeTableWidget::updateSectionHeight(int logicalIndex, int /* oldSize */, int newSize)
{
    qDebug() << "updateSectionHeight" << logicalIndex << newSize;
    //LUpdate
#if FREEZE_ROW
    if (logicalIndex == m_iFreezeRows-1){

        int height = 0;
        for(int i = 0; i< m_iFreezeRows-1; i++)
        {
            height += rowHeight(i);
        }

        for(int i = 0; i< m_iFreezeRows; i++)
        {
            frozenRowTableView->setRowHeight(i, (newSize+height)/m_iFreezeRows);
        }
        updateFrozenRowTableGeometry();
    }
#else
    frozenRowTableView->setRowHeight(logicalIndex, newSize);
#endif
}
//! [sections]


//! [resize]
void FreezeTableWidget::resizeEvent(QResizeEvent * event)
{
    QTableView::resizeEvent(event);
#if FREEZE_COL
    updateFrozenColTableGeometry();
#endif

#if FREEZE_ROW
    updateFrozenRowTableGeometry();
#endif

#if FREEZE_ROW && FREEZE_COL
    updateFrozenCroTableGeometry();
#endif

}
//! [resize]


//! [navigate]
QModelIndex FreezeTableWidget::moveCursor(CursorAction cursorAction,
                                          Qt::KeyboardModifiers modifiers)
{
    QModelIndex current = QTableView::moveCursor(cursorAction, modifiers);

#if FREEZE_COL
    if (cursorAction == MoveLeft && current.column() > 0
            && visualRect(current).topLeft().x() < frozenColTableView->columnWidth(0) ){
        const int newValue = horizontalScrollBar()->value() + visualRect(current).topLeft().x()
                - frozenColTableView->columnWidth(0);
        horizontalScrollBar()->setValue(newValue);
    }
#endif
#if FREEZE_ROW
    if(cursorAction == MoveDown && current.row() > 0
            && visualRect(current).topLeft().y() < frozenRowTableView->rowHeight(0))
    {
        const int newValue = verticalScrollBar()->value() + visualRect(current).topLeft().y()
                - frozenRowTableView->rowHeight(0);
        verticalScrollBar()->setValue(newValue);
    }
#endif
    return current;
}
//! [navigate]

void FreezeTableWidget::scrollTo (const QModelIndex & index, ScrollHint hint){
    if (index.column() > 0)
        QTableView::scrollTo(index, hint);
}

//! [geometry]
void FreezeTableWidget::updateFrozenCroTableGeometry()
{
    qDebug() << "updateFrozenCroTableGeometry ==";
    //LUpdate
    int width = 0, height = 0, x = 0, y = 0;
    qDebug() << "ver:" << verticalHeader()->width() << verticalHeader()->height();
    qDebug() << "hor:" << horizontalHeader()->width() << horizontalHeader()->height();
    qDebug() << "frame:" << frameWidth() << frameRect().width()<< frameRect().height() << frameRect().x() << frameRect().y();
    x = frameWidth();
    y = frameWidth();

#if FREEZE_COL && FREEZE_ROW
    width = verticalHeader()->width();
    for(int i = 0; i< m_iFreezeCols; i++)
    {
        width += columnWidth(i);
    }
    height = horizontalHeader()->height();
    for(int i = 0; i< m_iFreezeRows; i++)
    {
        height += rowHeight(i);
    }
#else
    width = viewport()->width()+verticalHeader()->width();
    height = viewport()->height()+horizontalHeader()->height();
#endif

    qDebug() << "x, y, width, height" << x << y << width << height;
    frozenCroTableView->setGeometry(x, y, width, height);
}
//! [geometry]

//! [geometry]
void FreezeTableWidget::updateFrozenColTableGeometry()
{
    qDebug() << "updateFrozenColTableGeometry ==";
    //LUpdate
    int width = 0, height = 0, x = 0, y = 0;
    qDebug() << "ver:" << verticalHeader()->width() << verticalHeader()->height();
    qDebug() << "hor:" << horizontalHeader()->width() << horizontalHeader()->height();
    qDebug() << "frame:" << frameWidth() << frameRect().width()<< frameRect().height() << frameRect().x() << frameRect().y();
    x = frameWidth();
    y = frameWidth();

#if FREEZE_COL
    width = verticalHeader()->width();
    for(int i = 0; i< m_iFreezeCols; i++)
    {
        width += columnWidth(i);
    }
#else
    width = viewport()->width()+verticalHeader()->width();
#endif

    height = viewport()->height()+horizontalHeader()->height();

    qDebug() << "x, y, width, height" << x << y << width << height;
    frozenColTableView->setGeometry(x, y, width, height);
}
//! [geometry]

//! [geometry]
void FreezeTableWidget::updateFrozenRowTableGeometry()
{
    qDebug() << "updateFrozenRowTableGeometry ==";
    //LUpdate
    int width = 0, height = 0, x = 0, y = 0;
    qDebug() << "ver:" << verticalHeader()->width() << verticalHeader()->height();
    qDebug() << "hor:" << horizontalHeader()->width() << horizontalHeader()->height();
    qDebug() << "frame:" << frameWidth() << frameRect().width()<< frameRect().height() << frameRect().x() << frameRect().y();
    x = frameWidth();
    y = frameWidth();
    width = viewport()->width()+verticalHeader()->width();
#if FREEZE_ROW
    height = horizontalHeader()->height();
    for(int i = 0; i< m_iFreezeRows; i++)
    {
        height += rowHeight(i);
    }
#else
    height = viewport()->height()+horizontalHeader()->height();
#endif

    qDebug() << "x, y, width, height" << x << y << width << height;
    frozenRowTableView->setGeometry(x, y, width, height);
}
//! [geometry]



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

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

相关文章

ansible 调研

参考&#xff1a;自动化运维工具——ansible详解&#xff08;一&#xff09; - 珂儿吖 - 博客园 (cnblogs.com) ansible是新出现的自动化运维工具&#xff0c;基于Python开发&#xff0c;集合了众多运维工具&#xff08;puppet、chef、func、fabric&#xff09;的优点&#xf…

专用/独享代理与共享代理有何区别?如何选择?

近年来&#xff0c;互联网发展快速&#xff0c;随着许多互联网业务的迸发&#xff0c;代理IP也作为一种互联网工具进入大家的业务&#xff0c;广泛地运用于跨境电商、社媒运营、SEO检测、市场研究等业务中。那么代理IP分为共享与独享&#xff0c;他们使用上有什么区别&#xff…

让你的对象变得拗口:JSON.stringify(),我把对象夹进了 JSON 魔法帽!

&#x1f3ac; 江城开朗的豌豆&#xff1a;个人主页 &#x1f525; 个人专栏 :《 VUE 》 《 javaScript 》 &#x1f4dd; 个人网站 :《 江城开朗的豌豆&#x1fadb; 》 ⛺️ 生活的理想&#xff0c;就是为了理想的生活 ! 目录 引言 1. JSON.stringify() 属性 replacer …

Gartner中国零信任网络访问市场指南发布!持安科技获评代表厂商

近日&#xff0c;全球权威市场研究与咨询机构Gartner发布《中国零信任网络访问市场指南》。其中&#xff0c;零信任办公安全企业持安科技入选为中国零信任网络访问领域“代表厂商”。 市场指南报告&#xff08;Market Guide&#xff09;是Gartner基于技术发展、落地案例等进行严…

Linux 实时补丁开启内核抢占了吗?

Linux 实时补丁开启内核抢占了吗&#xff1f; 开启了。 查看Linux实时补丁&#xff0c;发现修了如下内核宏&#xff1a; PREEMPT_RT补丁的关键点是最小化不可抢占的内核代码量&#xff0c;同时最小化为了提供这种额外的可抢占性而必须更改的代码量。特别是&#xff0c;临界区…

深度学习DAY3:激活函数

激活函数映射——引入非线性性质 h &#xff08;Σ(W * X)b&#xff09; yσ&#xff08;h&#xff09; 将h的值通过激活函数σ映射到一个特定的输出范围内的一个值&#xff0c;通常是[0, 1]或[-1, 1] 1 Sigmoid激活函数 逻辑回归LR模型的激活函数 Sigmoid函数&#xff0…

竞赛 深度学习 大数据 股票预测系统 - python lstm

文章目录 0 前言1 课题意义1.1 股票预测主流方法 2 什么是LSTM2.1 循环神经网络2.1 LSTM诞生 2 如何用LSTM做股票预测2.1 算法构建流程2.2 部分代码 3 实现效果3.1 数据3.2 预测结果项目运行展示开发环境数据获取 最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天…

Bootstrap中让元素尽可能往父容器的左侧靠近或右侧造近(左浮动和右浮动)

在Bootstrap中&#xff0c;float-left是一个用于浮动元素的CSS类。它的作用是将一个元素向左浮动&#xff0c;使其在父容器内尽可能靠近左侧边缘&#xff0c;同时允许其他元素在其右侧排列。 使用float-left类可以创建多列布局&#xff0c;将元素水平排列在一行上&#xff0c;…

【脑机接口论文与代码】High-speed spelling with a noninvasive brain–computer interface

High-speed spelling with a noninvasive brain–computer interface 中文题目 &#xff1a;非侵入性的高速拼写脑机接口论文下载算法程序下载摘要1 项目介绍2 方法2.1SSVEPs的基波和谐波分量JFPM刺激产生算法2.3基波和谐波SSVEP分量的幅度谱和信噪比 3讨论4实验环境设置与方法…

全球邮企业邮箱服务比较:找寻最佳选择

“全球邮企业邮箱服务比较&#xff1a;Gmail、Outlook、Yahoo Mail、Zoho Mail&#xff0c;更适合中国用户的是Zoho Mail。” 在全球化的商业环境中&#xff0c;企业邮箱已经成为了一种重要的沟通工具。它不仅提供了安全、可靠的电子邮件服务&#xff0c;而且还能够集成其他企业…

hive add columns 后查询不到新字段数据的问题

分区表add columns 查询不到新增字段数据的问题&#xff1b; 5.1元数据管理 &#xff08;1&#xff09;基本架构 Hive的2个重要组件&#xff1a;hiveService2 和metastore,一个负责转成MR进行执行&#xff0c;一个负责元数据服务管理 beeline-->hiveService2/spar…

性能分析与调优(硬核分享)

前言 常看到性能测试书中说&#xff0c;性能测试不单单是性能测试工程师一个人的事儿。需要DBA 、开发人员、运维人员的配合完成。但是在不少情况下性能测试是由性能测试人员独立完成的&#xff0c;退一步就算由其它人员的协助&#xff0c;了解系统架构的的各个模块对于自身的…

MAX4/11/03/016/08/1/1/00 MAX-4/11/01/008/08/1/1/00

MAX4/11/03/016/08/1/1/00 MAX-4/11/01/008/08/1/1/00 sales force宣布推出制造业云(Manufacturing Cloud)&#xff0c;这是一款面向制造商的行业专用产品。制造云致力于将销售和运营团队聚集在统一的市场和客户需求视图周围&#xff0c;目标是更准确地预测、规划和推动可预测…

口袋参谋:如何对宝贝关键词进行词根分析?用它就对了!

​为什么宝贝转化不好&#xff1f;90%的原因是宝贝关键词没选好&#xff0c;关键词选择得不好&#xff0c;会出现点击率、展现、访客、收藏加购率等数据降低的情况&#xff0c;还会导致关键词质量得分波动大&#xff0c;甚至影响整个店铺的经营。 所以对电商卖家来说&#xff…

微信照片过期打不开怎么办?用这个办法可找回

时间太久想找之前的聊天图片 却发现图片已被清理 因为忙碌或者在外游玩一时间忘了点开 想起要找回的时候却发现已经过期 不妨试试这样几个找回小方法 PART2 图片找回 收藏和搜一搜找回 长按要找回的图片 点击收藏或搜一搜 不能保证百分百的成功率哦 存储空间找回 打开【存…

性能测试-如何进行监控设计

监控设计步骤 首先&#xff0c;你要分析系统的架构。在知道架构中使用的组件之后&#xff0c;再针对每个组件进行监控。 其次&#xff0c;监控要有层次&#xff0c;要有步骤。先全局&#xff0c;后定向定量分析。 最后&#xff0c;通过分析全局、定向、分层的监控数据做分析…

多个微信怎么实现自动回复、自动通过好友自动打招呼?

你是否有遇到这个问题&#xff1f; 1、微信号太多&#xff0c;为了能及时回复消息&#xff0c;经常带多台手机&#xff0c;重且不好携带。 2、多个微信号来回切换导致没及时通过客户好友申请&#xff0c;导致客户流失。 3、每天需要手动添加和通过好友申请来管理微信客户&am…

DC/DC开关电源学习笔记(十二)Boost升压电路仿真及工程应用案例

(十二)Boost升压电路仿真及工程应用案例 1.Boost电路仿真案例2.Boost电路工程应用实例1.Boost电路仿真案例 指标参数:输入电压5V,输出电压12V,输出电流1A,开关频率10kHz,电压纹波0.5%。 根据输入指标参数确定CCM模式下各个关键元器件测参数: 负载电阻Rl=12R 占空比D=6…

同步云盘:理解云端数据的实时同步技术

同步云盘是一种基于云计算技术的存储和文件同步服务 什么是同步云盘&#xff1f; 同步云盘是一种基于云计算技术的存储和文件同步服务。它允许用户将文件上传到云端&#xff0c;并在多个设备之间同步和共享这些文件。通过同步云盘&#xff0c;用户可以轻松地在不同设备上访问和…

LeetCode【42】接雨水

题目&#xff1a; 思路&#xff1a; https://blog.csdn.net/weixin_45345143/article/details/128178541 代码&#xff1a; public int trap(int[] height) {int n height.length;int[] leftHeight new int[n];leftHeight[0] height[0];for (int i 1; i < n; i) {lef…