既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上物联网嵌入式知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、电子书籍、讲解视频,并且后续会持续更新
需要这些体系化资料的朋友,可以加我V获取:vip1024c (备注嵌入式)
~learn();
// 按钮移动
void MovePushButton();
//鼠标点击
void PressMouseEvent(QMouseEvent\* e);
//鼠标松开
void ReleaseMouseEvent(QMouseEvent\* e);
//鼠标移动
void MoveMouseEvent(QMouseEvent\* e);
//设置透明
void SetLucency();
//修改按钮
void ChangeButtonText();
private:
Ui::learnClass ui;
QPushButton* bnt;
QPoint last; //记录鼠标最近一次的坐标点
};
void learn::ChangeButtonText()
{
if (!bnt)
{
delete bnt;
bnt = nullptr;
}
bnt = new QPushButton(QString::fromLocal8Bit(“修改文本”), this);
//设置按钮的原点和宽高
bnt->setGeometry(QRect(100, 100, 100, 25));
//注册按钮处理事件
connect(bnt, &QPushButton::clicked, this, =
{
bnt->setText(QString::fromLocal8Bit(“按钮已经修改”));
});
}
### QLabel
在窗体中创建 QLabel 标签显示“我是 QLabel”字样,红色加粗倾斜字体。

void learn::ChangeLabel()
{
if (!label)
{
delete label;
label = nullptr;
}
//指定父对象, 设置Qlable文本
this->label = new QLabel(QString::fromLocal8Bit(“我是QLabel”), this);
this->setGeometry(QRect(100, 100, 100, 25));
/*
font-size:20px 字体大小
color:red 设置颜色
font-weight:bold 字宽
font-style:italic 字体样式
*/
//设置Qlable qss样式
label->setStyleSheet(“font-size:20px; font-weight:bold; font-style:italic”);
}
### QLineEdit 单行文本
对输入的密码会进行一个隐藏设置

void learn::ChangeLineEdit()
{
if (!line)
{
delete line;
line = nullptr;
}
this->line = new QLineEdit(this);
//设置单行坐标和宽高
line->setGeometry(QRect(100, 100, 300, 25));
//设置单行文本样式
line->setStyleSheet(“font-size:20px; font-weight:bold; font-style:italic”);
//限制最大长度为12
line->setMaxLength(12);
//不可写设置
//line->setEchoMode(QLineEdit::NoEcho);
//对密码进行隐藏设置
line->setEchoMode(QLineEdit::Password);
}
### QComboBox 下拉列表框

void learn::AddCharActer()
{
if (this->box) {
delete box;
box = nullptr;
}
box = new QComboBox(this);
box->setGeometry(QRect(100, 100, 300, 25));
QStringList str;
str << QString::fromLocal8Bit(“数学”)
<< QString::fromLocal8Bit(“语文”)
<< QString::fromLocal8Bit(“地理”);
box->addItems(str);
}
### QFontComboBox 字体下拉列表框

void learn::AddFontComboBox()
{
//创建字体下拉列表
fontbox = new QFontComboBox(this);
fontbox->setGeometry(QRect(100, 125, 300, 25));
bnt = new QPushButton(QString::fromLocal8Bit("选择"), this);
bnt->setGeometry(QRect(100, 100, 300, 25));
line = new QLineEdit(this);
line->setGeometry(QRect(100, 150, 300, 25));
connect(bnt, &QPushButton::clicked, this, [=]()
{
//当选择按钮被点击时,自动更换line 的信息
line->setText(fontbox->currentText());
});
}
### QSpinBox 控件

void learn::AddSpinBox()
{
spin = new QSpinBox(this);
spin->setGeometry(QRect(100, 125, 300, 25));
//设置取值范围
spin->setRange(0,100);
//设置初始值
spin->setValue(0);
//除了初始值这些可以被修改,除此之外所有的文本都不允许被修改
//后缀
spin->setSuffix(QString::fromLocal8Bit("元/斤"));
//前缀
spin->setPrefix(QString::fromLocal8Bit("苹果"));
}
### QTimeEdit 时间控件

void learn::AddTimeEdit()
{
time = new QTimeEdit(this);
time->setGeometry(QRect(100, 125, 300, 25));
//获取系统时间
QDateTime systime = QDateTime::currentDateTime();
//获取时分秒以“:”号拆分赋予 list 数组
QStringList list = systime.toString("h:m:s").split(":");
//打印系统时间
qDebug() << list;
//将时分秒绑定控件
time->setTime(QTime(list[0].toInt(), list[1].toInt()));
}
### QDateEdit 日期控件

void learn::AddDateEdit()
{
date = new QDateEdit(this);
date->setGeometry(QRect(100, 150, 300, 25));
//获取系统时间
QDateTime time = QDateTime::currentDateTime();
QStringList list = time.toString(“yyyy-MM-dd”).split(“-”);
date->setDate(QDate(list[0].toInt(), list[1].toInt(), list[2].toInt()));
}
### QScrollBar 滑动条控件

void learn::AddScrollBar()
{
this->setWindowFlags(Qt::FramelessWindowHint);
this->ScrollBar = new QScrollBar(this);
this->spin = new QSpinBox(this);
//横显/竖显
ScrollBar->setOrientation(Qt::Horizontal);
//指定大小
ScrollBar->setGeometry(QRect(50, 50, 180, 20));
spin->setGeometry(QRect(50, 90, 100, 25));
//控制条宽度
ScrollBar->setPageStep(10);
//随着scrollBar 按钮在不断的移动的过程中,spin控件会及时更新 scrollBar 的现值
connect(ScrollBar, &QScrollBar::valueChanged, spin, [=]()
{
spin->setValue(ScrollBar->value());
});
}
### QRadioButton 单选按钮

void learn::AddRadioButton()
{
label = new QLabel(this);
label->setText(QString::fromLocal8Bit(“选择内容:”));
line = new QLineEdit(this);
this->radioW = new QRadioButton(QString::fromLocal8Bit("女人") , this);
this->radioM = new QRadioButton(QString::fromLocal8Bit("男人"), this);
收集整理了一份《2024年最新物联网嵌入式全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升的朋友。
需要这些体系化资料的朋友,可以加我V获取:vip1024c (备注嵌入式)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人
都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
[外链图片转存中…(img-MZQp02AO-1715899650912)]
[外链图片转存中…(img-9yM8LEFv-1715899650913)]
需要这些体系化资料的朋友,可以加我V获取:vip1024c (备注嵌入式)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人
都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!