Qt实战开发-数字软键盘

2023-05-16

开发的思路

  • 布局键盘界面
  • 每一个button对应一个槽函数
  • 把输入的字符返回到点击处的文本编辑框

    开发过程

  • 首先定义功能button,在头文件中定义

    QString getText();
    QPushButton *num6Button;
    QPushButton *backspaceButton;
    QPushButton *num4Button;
    QPushButton *okButton;
    QPushButton *leftButton;
    QPushButton *num1Button;
    QPushButton *cancelButton;
    QPushButton *rightButton;
    QPushButton *num9Button;
    QPushButton *num8Button;
    QPushButton *num2Button;
    QPushButton *num7Button;
    QPushButton *dotButton;
    QPushButton *num3Button;
    QPushButton *num0Button;
    QPushButton *num5Button;
    QPushButton *signButton;
    QLineEdit *lineEdit;

接着定义相关联的槽函数

    void on_num1Button_clicked();
    void on_num2Button_clicked();
    void on_num3Button_clicked();
    void on_num4Button_clicked();
    void on_num5Button_clicked();
    void on_num6Button_clicked();
    void on_num7Button_clicked();
    void on_num8Button_clicked();
    void on_num9Button_clicked();
    void on_dotButton_clicked();
    void on_num0Button_clicked();
    void on_signButton_clicked();
    void on_leftButton_clicked();
    void on_rightButton_clicked();
    void on_backspaceButton_clicked();
    void on_cancelButton_clicked();
    void on_okButton_clicked();

下面定义界面布局显示的功能模块

        okButton = new QPushButton(this);
        okButton->setText(" OK");
        okButton->setGeometry(QRect(190, 250, 110, 50));
        QFont font1;
        font1.setPointSize(14);
        okButton->setFont(font1);

        backspaceButton = new QPushButton(this);
        backspaceButton->setText(" backspace");
        backspaceButton->setGeometry(QRect(190, 130, 110, 50));
        backspaceButton->setFont(font1);

        num6Button = new QPushButton(this);
        num6Button->setText("6");
        num6Button->setGeometry(QRect(130, 130, 50, 50));
        QFont font;
        font.setPointSize(22);
        num6Button->setFont(font);

        num4Button = new QPushButton(this);
        num4Button->setText(" 4");
        num4Button->setGeometry(QRect(10, 130, 50, 50));
        num4Button->setFont(font);

        leftButton = new QPushButton(this);
        leftButton->setText("<-");
        leftButton->setGeometry(QRect(190, 190, 50, 50));
        leftButton->setFont(font);

        num1Button = new QPushButton(this);
        num1Button->setText("1");
        num1Button->setGeometry(QRect(10, 70, 50, 50));
        num1Button->setFont(font);

        cancelButton = new QPushButton(this);
        cancelButton->setText("Esc");
        cancelButton->setGeometry(QRect(190, 70, 110, 50));
        cancelButton->setFont(font1);

        rightButton = new QPushButton(this);
        rightButton->setText("->");
        rightButton->setGeometry(QRect(250, 190, 50, 50));
        rightButton->setFont(font);

        num9Button = new QPushButton(this);
        num9Button->setText("9");
        num9Button->setGeometry(QRect(130, 190, 50, 50));
        num9Button->setFont(font);

        num8Button = new QPushButton(this);
        num8Button->setText("8");
        num8Button->setGeometry(QRect(70, 190, 50, 50));
        num8Button->setFont(font);

        num2Button = new QPushButton(this);
        num2Button->setText("2");
        num2Button->setGeometry(QRect(70, 70, 50, 50));
        num2Button->setFont(font);

        num7Button = new QPushButton(this);
        num7Button->setText("7");
        num7Button->setGeometry(QRect(10, 190, 50, 50));
        num7Button->setFont(font);

        dotButton = new QPushButton(this);
        dotButton->setText(".");
        dotButton->setGeometry(QRect(130, 250, 50, 50));
        dotButton->setFont(font);


        num3Button = new QPushButton(this);
        num3Button->setText("3");
        num3Button->setGeometry(QRect(130, 70, 50, 50));
        num3Button->setFont(font);

        num0Button = new QPushButton(this);
        num0Button->setText("0");
        num0Button->setGeometry(QRect(10, 250, 50, 50));
        num0Button->setFont(font);

        num5Button = new QPushButton(this);
        num5Button->setText("5");
        num5Button->setGeometry(QRect(70, 130, 50, 50));
        num5Button->setFont(font);

        signButton = new QPushButton(this);
        signButton->setText("+/-");
        signButton->setGeometry(QRect(70, 250, 50, 50));
        QFont font2;
        font2.setPointSize(20);
        signButton->setFont(font2);

        lineEdit = new QLineEdit(this);
        lineEdit->setGeometry(QRect(10, 10, 290, 50));
        QFont font3;
        font3.setPointSize(24);
        font3.setWeight(50);
        lineEdit->setFont(font3);
        lineEdit->setText(QString());

相应的槽函数功能

void NumKeyboard::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        break;
    default:
        break;
    }
}

bool NumKeyboard::eventFilter(QObject *obj, QEvent *event)
{
    if (event->type() == QEvent::KeyPress)
    {
            QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
            if (obj == lineEdit)
            {
                if(keyEvent->key() >= 0x20 && keyEvent->key()<= 0x0ff)  
                    return true;
                else
                    return false;
            }
            else
            {
                return false;
            }
    }
    else
    {
            // standard event processing
        return QObject::eventFilter(obj, event);
    }
}

//***********************按键*****************************//
void NumKeyboard::on_num1Button_clicked()       //1
{
    int idx = lineEdit->cursorPosition();  
    if(strContent.left(idx) == "0")       
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }

    strContent.insert(idx, '1'); 
    lineEdit->setText(strContent); 
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus(); 
    qDebug()<<"strContent"<<strContent;
    qDebug()<<"idx"<<idx;
}

void NumKeyboard::on_num2Button_clicked()       //2
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '2');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num3Button_clicked()       //3
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '3');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num4Button_clicked()       //4
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '4');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num5Button_clicked()       //5
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '5');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num6Button_clicked()       //6
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '6');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num7Button_clicked()       //7
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '7');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num8Button_clicked()       //8
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '8');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num9Button_clicked()       //9
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0")
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '9');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_dotButton_clicked()        //.
{
    int idx = lineEdit->cursorPosition();

    if(idx==0 || strContent.contains('.'))
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }

    strContent.insert(idx, '.');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_num0Button_clicked()       //0
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(idx) == "0" || (idx==0 &&strContent!=""))
    {
        lineEdit->setCursorPosition(idx);
        qDebug()<<"idx"<<idx;
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '0');
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_signButton_clicked()       //+/-
{
    int idx = lineEdit->cursorPosition();
    if(strContent.left(1) == "-")
    {
        strContent.remove(0, 1);
        lineEdit->setText(strContent);
        lineEdit->setCursorPosition(idx-1);
        lineEdit->setFocus();
    }
    else
    {
        if(strContent=="0" || strContent=="")
        {
            lineEdit->setCursorPosition(idx);
            lineEdit->setFocus();
        }
        else
        {
            strContent.insert(0, '-');
            lineEdit->setText(strContent);
            lineEdit->setCursorPosition(idx+1);
            lineEdit->setFocus();
        }
    }
}

void NumKeyboard::on_leftButton_clicked()       //left
{
    int idx = lineEdit->cursorPosition();
    if(idx == 0)
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    lineEdit->setCursorPosition(idx-1);
    lineEdit->setFocus();
}

void NumKeyboard::on_rightButton_clicked()      //right
{
    int idx = lineEdit->cursorPosition();
    if(idx == strContent.length()) //返回此字符串的字符数
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();
}

void NumKeyboard::on_backspaceButton_clicked()      //backspace
{
    int idx = lineEdit->cursorPosition();
    if(idx == 0)
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.remove(idx-1,1);
    lineEdit->setText(strContent);
    lineEdit->setCursorPosition(idx-1);
    lineEdit->setFocus();
}

void NumKeyboard::on_cancelButton_clicked()     //cancel
{
    this->close();
    valid = false;
}

void NumKeyboard::on_okButton_clicked()         //ok
{
    this->close();
    valid = true;
}

void NumKeyboard::setText(QString str)      //设置文本内容
{
    strContent = str;
    lineEdit->setText(strContent);
    lineEdit->setFocus();
}

QString NumKeyboard::getText()              //获取内容
{
    return strContent;
}

上面的槽函数中只对大体的相似,只对不同处做出讲解
以点击“1”为例:
获取在软键盘中的文本框中光标的位置,赋值给idx,索引用

int idx = lineEdit->cursorPosition();  

官方的解释如下
QString x = “Pineapple”;
QString y = x.left(4); // y == “Pine”
同理下面的代码含义是:把当前光标位置左侧所有的数,存放在strContent中,
if判断的作用是,当数值开头是0,便不能够输入。一个简单的检查的功能,例如无法输入”01“

insert的官方解释
QString str = “Meal”;
str.insert(1, QString(“ontr”));
// str == “Montreal”
下面语句的作用是在当前的坐标处出插入1;把新的字符串返回给strContent
(初始时idx=0,光标位置是0)
strContent.insert(idx, ‘1’);
随后设置当前的光标的位置+1,
lineEdit->setCursorPosition(idx+1);
显示光标
lineEdit->setFocus();

void NumKeyboard::on_num1Button_clicked()       //1
{
    int idx = lineEdit->cursorPosition();  
    if(strContent.left(idx) == "0")       
    {
        lineEdit->setCursorPosition(idx);
        lineEdit->setFocus();
        return;
    }
    strContent.insert(idx, '1');  
    lineEdit->setText(strContent); 
    lineEdit->setCursorPosition(idx+1);
    lineEdit->setFocus();  

}

在设置正负的时候还会用到 strContent.remove(0, 1);
官方的解释是:
QString s = “Montreal”;
s.remove(1, 4);
// s == “Meal”
上面的含义是,在0的位置删除1个字符。就是数字前面的+、-

在设置右移的槽函数中
idx == strContent.length()) //返回此字符串的字符数

最后通过getText() 函数获取文本的内容

QString NumKeyboard::getText() //获取内容
{
return strContent;
}

void SoftKeyLineEdit::mousePressEvent(QMouseEvent *e)
{
    if(e->button() == Qt::LeftButton)
    {
        numkeyboard->setText(this->text());  
        numkeyboard->exec();
        if(numkeyboard->valid)
        {
            this->setText(numkeyboard->getText());  
        }
    }
}

我们通过鼠标点击的方式来触发软键盘
下面的函数的作用是:把当前的文本框中的内容传递给软件盘中的文本框
numkeyboard->setText(this->text());
下面的exec()与show()显示的方式有所不同。
exec():
显示一个模式对话框,并且锁住程序直到用户关闭该对话框为止。
show():
显示一个非模式对话框。控制权即刻返回给调用函数。
numkeyboard->exec();
如果点击“确认”按键后 valid返回值是true
if(numkeyboard->valid)

随后把返回得到的字符串,传递到点击处的文本框中。
this->setText(numkeyboard->getText());

如何快速一个上面的软键盘到项目中
1.包含上面的cpp和.h文件
2.通过触发的方式触发下面语句
numkeyboard->setText(this->text());
numkeyboard->exec();
if(numkeyboard->valid)
{
this->setText(numkeyboard->getText());
}
3.触发方式可以是信号(例如clicked())
另外看还可以是mousePressEvent(); 它的使用方式要重写
细节(QString 定义的strContent存储有引用计数,指向相同的存储空间,仅仅 是增加一个引用计数)

效果图

这里写图片描述

源代码下载
http://download.csdn.net/detail/osean_li/9773460

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Qt实战开发-数字软键盘 的相关文章

  • esp32-arduino入门之点亮led

    参考 xff1a https learncplusplus org how to program arduino with c span class token macro property span class token directi
  • stm32 学习资料汇总

    外设库以及example xff1a Google 搜索 STM32 Standard Peripheral Libraries
  • HttpClient学习研究---第四章:HTTP authenticationHTTP身份验证

    第四章 HTTP authentication HTTP身份验证 HttpClient provides full support for authentication schemes defined by the HTTP standar
  • Linux系统下常用的3个网络测试工具!

    在Linux系统中 xff0c 有很多用于管理和监测网络连接的命令 xff0c 其中ping traceroute和nslookup是比较常用的网络命令 xff0c 可以用来测试网络 诊断网络故障等等 xff0c 以下是详细的内容 xff1
  • TCP.02.SELECT模型

    文章目录 SELECT模型简介SELECT模型流程SELECT原理SELECT代码实现fd set 数组及基本操作SELECT函数参数2 xff08 重点 xff09 参数3参数4 关闭所有SOCKET句柄处理控制台窗口关闭事件整体代码思考
  • Node.js http 模块详解:request 对象

    前言 前文介绍了 http 模块的基本用法 xff0c 主要就是调用 createServer 和 listen 方法来创建和启动服务 要处理具体的 HTTP 请求 xff0c 就要在 createServer 方法中写点什么 本文来介绍处
  • 如何确认串口波特率

    文章目录 1 盲扫一遍2 示波器测量1bit时间3 逻辑分析仪确认 背景 xff1a 手上有一个模块使用串口通信但是不知道其波特率 xff0c 如何确认它的波特率呢 xff1f 1 盲扫一遍 波特率有常用的配置9600 115200 230
  • curl命令常用参数

    curl命令常用参数 curl简介常用方法将远程文件下载到本地 o并指定名称指定请求方式 X显示响应结果 v携带用户名 密码 u携带请求头 H查看服务端响应头 i只显示http response的头信息 I自动跳转 L模拟dns解析 res
  • 学习ZLmediaKit流媒体服务器时候遇到的问题

    照zlmediakit的源码 自己复制了一份 然后有的地方编译不过修改了部分 测试的时候发现有两个问题 第一是 ffmpeg的ffplay 能播放 vlc不能播放 第二个问题是directProxy设置为0的时候 推流的时候 然后用ffpl
  • 如何在C/C++中使用pi (π) 值

    在math h有一个宏定义M PI if defined USE MATH DEFINES amp amp defined MATH DEFINES DEFINED define MATH DEFINES DEFINED Definitio
  • 关于#include<bits/stdc++.h>

    偶然发现 span class hljs preprocessor include lt bits stdc 43 43 h gt span 包括了C 43 43 几乎所有的头文件 xff0c 感觉以后可以返璞归真了 回顾自己不长的竞赛历程
  • 单片机STM32直连电调控制航模涵道电机的方法总结

    单片机STM32直连电调控制航模涵道电机的方法总结 文章目录 单片机STM32直连电调控制航模涵道电机的方法总结前言一 硬件情况二 涵道电机两种常见的驱动方式1 有线控制方式2 无线控制方案 解决方案 前言 由于项目需要 xff0c 我需要
  • PX4之常用函数解读

    PX4Firmware 经常有人将Pixhawk PX4 APM还有ArduPilot弄混 这里首先还是简要说明一下 xff1a Pixhawk是飞控硬件平台 xff0c PX4和ArduPilot都是开源的可以烧写到Pixhawk飞控中的
  • PX4项目学习::(七)飞控栈:commander

    PX4的飞行控制程序通过模块来实现 xff0c 与飞控相关的模块主要有commander xff0c navigator xff0c pos control xff0c att control这几个 xff0c 分别可以在src modul
  • PX4项目学习::(五)模块代码启动流程

    54条消息 PX4 模块代码启动流程 zhao23333的博客 CSDN博客
  • TX2指南(一)TX2接显示器的问题

    TX2开发板一定要适配HDMI显示器 xff0c 使用转接头在VGA显示器会显示 input signal out of range xff01 所以目前来看手上的这套TX2只能适配HDMI显示器 xff0c 目前还不清楚是不是所有的TX2
  • 推荐定位信息(GPRMC)

    推荐定位信息 GPRMC GPRMC lt 1 gt lt 2 gt lt 3 gt lt 4 gt lt 5 gt lt 6 gt lt 7 gt lt 8 gt lt 9 gt lt 10 gt lt 11 gt lt 12 gt hh
  • linux中使用shell命令打开指定文件夹(Nautilus@GNOME)

    在GNOME中是Nautilus 鹦鹉螺 xff0c 而KDE中是Konqueror nautilus 图形化桌面包括了一个叫做 Nautilus 的文件管理器 它给你提供了系统和个人文件的图形化显示 然而 xff0c Nautilus 不
  • 在ubuntu20.4下安装ardupilot 4.3.6

    这次重新安装真的是遇到了好多坑啊 xff01 从github上靠过来按照之前的那篇文章流程做完之后 xff0c 还会有一些别的问题 首先是module里面的包都没有拷过来 xff0c 所以需要用git add将文件都添加过来 之后进行编译时
  • Visual Studio 2022 搭建GLFW OpenGL开发环境

    最近工作需要 需要写一个全景的视频播放器 网上搜了下大概解决方案是 ffmpeg 43 opengl b站有很多视频 按照视频 搭建了OpenGL的开发环境 先去GLFW的网站下载 windows平台的库文件 为什么使用GLFW 因为GLF

随机推荐

  • Pixhawk原生固件PX4之自定义MAVLink消息

    欢迎交流 个人 Gitter 交流平台 xff0c 点击直达 xff1a 本着想在PX4基础上加点什么东西的我又开始折腾了 xff0c 先尝试用串口加传感器通过QGC查看 xff0c 要是能在原固件上加点内容就棒哉了 先立Flag 自定义u
  • Pixhawk原生固件PX4之MAVLink协议解析

    欢迎交流 个人 Gitter 交流平台 xff0c 点击直达 xff1a PX4 对Mavlink 协议提供了良好的原生支持 该协议既可以用于地面站 Ground ControlStation GCS 对无人机 UAV 的控制 xff0c
  • GPS和RTK的基本知识

    RTK的基本原理介绍 xff0c RTK一般由基站 移动站以及数据链路组成 下文摘自天宝 Trimble 官网 原文链接 xff1a http www trimble com OEM ReceiverHelp V4 44 en What i
  • freeRTOS系统栈与任务栈

    中断过来之后 xff0c 由任务栈切换到main stack xff08 系统栈 xff09 任务栈保存 系统栈的地址范围为0xfede8000 4K xff0c 向下生长 xff0c 所以按照ld的定义 xff0c 0xfede9000
  • ROS下上位机和stm32单片机通信

    1 需要实例化串口节点建立监听者listener和发布之publisher 2 上位机通过游戏手柄发布自定义消息类型control int64 mode 手柄模式切换 int64 lidar 雷达数据 int64 gamePad x 控制前
  • 奇偶校验码

    偶校验为例 xff1a 例图中 xff0c 下划线为校验位 xff0c 其余为信息位 检错步骤如下 xff1a 1 根据信息位算出校验位 xff08 通过异或运算 xff1a 相同为0 xff0c 不同为1 xff09 xff1a 得出校验
  • C++中#define和const的区别

    一 define是预处理指令 xff08 pre processor directive xff09 而const是关键字 define用于给一些值定义名称 字符串 xff0c 这样定义的字符串在C C 43 43 中称为宏定义 xff0c
  • select函数实现tcp服务器与客户端随时收发

    服务器 include lt stdio h gt include lt sys types h gt include lt sys socket h gt include lt arpa inet h gt include lt neti
  • STM32F10X库函数逻辑

    define PERIPH BASE unsigned int 0x40000000 定义外围总线基地址 define APB1PERIPH BASE PERIPH BASE xff09 APB1总线开始与外围总线基地址 define AP
  • STM32F10x外部中断EXTI

    目录 一 EXTI是什么 xff1f 二 使用方法 1 功能框图及寄存器 2 库函数编程 总结 提示 xff1a 以下是本篇文章正文内容 xff0c 下面案例可供参考 一 EXTI是什么 xff1f EXTI External interr
  • QT + OpenGL + FFmpeg写的一个全景视频播放器

    临时被分配了一个任务 写一个C 43 43 版本的全景视频播放器 网上搜了搜 基于前辈的基础上 写的差不多了 测试视频源是用ffmpeg拉RTSP的流 最终是要嵌入到别的一个视频播放器模块 所以解码这块我不用太关注 只要实现渲染就可以了 效
  • 15 侥幸:在随机性面前处变不惊

    引言 之前讲过的量化思维 xff0c 已经有概率思维的影子了 xff0c 开始学着用数字提高认识世界的分辨率 现在将继续加深对概率的理解 xff0c 来探讨随机性 它解决的人生难题是 xff1a 我们时常因为心存侥幸而失败 在随机的世界里
  • 【无人驾驶】自动驾驶领域有哪些岗位可选?

    导读 想要进入自动驾驶这个领域 xff0c 便首先去调查了下这个领域的岗位 xff0c 希冀能从中找出自己最感兴趣且匹配度也比较高的方向 废话不多说 xff0c 见下 下图为自动驾驶方向的所有岗位 xff0c 总量的来说 xff0c 方向可
  • 01_搭建百度apollo环境实操可用

    搭建百度apollo环境 0 前言1 目标2 方法3 Apollo环境搭建3 1 CPU版3 1 1前置依赖硬件条件3 2 GPU版前置依赖软件1 安装 Ubuntu 18 042 安装 GIT3 安装 Docker 引擎 3 1 3克隆
  • 02_两小时了解自动驾驶

    02 两小时了解自动驾驶 目标你将学到什么什么是无人驾驶无人驾驶的运作方式参考车辆与硬件平台开源软件架构仿真环境地图简介高精地图与传统地图地图与定位 感知 规划的关系高精地图定位简介GNSS RTK惯性导航激光雷达定位视觉定位融合定位感知简
  • PCA9555的使用个人总结

    1 德州仪器PCA9555 简化PCB布线 xff0c 对处理器有限的IO口进行补充 2 带中断 xff0c 不带重启 3 24 引脚的CMOS器件 xff0c 提供I2C SMBus16位通用并行 xff08 GPIO xff09 的扩展
  • stm32掉电前的数据存储到flash

    对FLASH 的操作 FLASh 必须是先擦 后 写 下面的函数是分析案例 void FLASH WriteByte u32 addr u16 flashdata1 FLASH Status FLASHstatus 61 FLASH COM
  • SPI对外部w25Q64的读写

    SPI 1 SPI是串行外围设备接口 SPI的接口主要应用在EEPROM xff0c FLASH xff0c 实时时钟 xff0c AD 转换器 xff0c 还有数字信号处理器和数字信号 解码器之间 2 SPI xff0c 是一种高速的 x
  • Qt实战开发-仪表盘制作

    仪表盘制作 相关的基础知识 QPainter用来执行具体的绘图相关的操作 xff0c 用来画点 xff0c 线 xff0c 填充 xff0c 变换 xff0c alpha 阿尔法通道 xff08 透明度 xff09 Appha的值越大 xf
  • Qt实战开发-数字软键盘

    开发的思路 布局键盘界面每一个button对应一个槽函数把输入的字符返回到点击处的文本编辑框 开发过程首先定义功能button xff0c 在头文件中定义 QString getText QPushButton span class hlj