摘要: 1,显示效果 2,页面布局 显示控件选择LCD Numer digitCount默认为5,不够用调整为10 3,具体代码 1 #include "timeshow.h" 2 #include "ui_timeshow.h" 3 4 timeshow::timeshow(QWidget *parent 阅读全文
posted @ 2021-03-06 21:59 老年新手工程师 阅读(152) 评论(0) 推荐(0)
摘要: listWidget中可以添加字符串,按钮等控件,以及自定义控件 首先定义QListWidgetItem,然后将所要添加的控件一起加入到listWidget 代码实现: 1,字符串 1 void ListW::on_btnstring_clicked() 2 { 3 ui->listWidget-> 阅读全文
posted @ 2021-03-06 00:03 老年新手工程师 阅读(1727) 评论(0) 推荐(0)
摘要: 1,显示效果 2,页面编辑方式,画好页面之后转到槽函数 3,各个槽函数代码简单实现 3.1,打开 1 void Filewin::on_actionopen_triggered() 2 { 3 QString fitler=QString("Text from(*.cpp *.h)"); 4 fil 阅读全文
posted @ 2021-03-05 21:03 老年新手工程师 阅读(313) 评论(0) 推荐(0)
摘要: //单击按钮显示目录下所有文件槽函数 void filewindow::on_pushButton_clicked() { //获取对话框路径 QString dirpath=QFileDialog::getExistingDirectory(this,"choose directory","./" 阅读全文
posted @ 2021-03-03 22:28 老年新手工程师 阅读(1242) 评论(1) 推荐(0)
摘要: 主要为了配合学习QT,还有一些bug,先不深究 #include "calc.h" #include "ui_calc.h" calc::calc(QWidget *parent) : QMainWindow(parent), ui(new Ui::calc) { ui->setupUi(this) 阅读全文
posted @ 2021-02-28 12:07 老年新手工程师 阅读(434) 评论(0) 推荐(0)
摘要: #include "layout.h" #include "ui_layout.h" Layout::Layout(QWidget *parent) : QMainWindow(parent), ui(new Ui::Layout) { ui->setupUi(this); window_init( 阅读全文
posted @ 2021-02-27 19:47 老年新手工程师 阅读(1988) 评论(0) 推荐(1)
摘要: event事件重写,显示鼠标位置 1 void EventLabel::mouseMoveEvent(QMouseEvent *event) 2 { 3 this->setText(QString("<center><h1>Move:(%1,%2)</h1></center>") 4 .arg(QS 阅读全文
posted @ 2021-02-25 15:00 老年新手工程师 阅读(345) 评论(0) 推荐(0)
摘要: 原文地址 https://www.imooc.com/article/254520 前言 FFMPEG是特别强大的专门用于处理音视频的开源库。你既可以使用它的API对音视频进行处理,也可以使用它提供的工具,如 ffmpeg, ffplay, ffprobe,来编辑你的音视频文件。 本文将简要介绍一下 阅读全文
posted @ 2021-02-24 20:41 老年新手工程师 阅读(473) 评论(0) 推荐(0)
摘要: 头文件内容 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QAction> 6 #include <QMenu> 7 #include <QToolBar> 8 #includ 阅读全文
posted @ 2021-02-24 16:13 老年新手工程师 阅读(546) 评论(0) 推荐(0)
摘要: #include <libavutil/log.h> #include <libavformat/avformat.h> int main(int argc,char* argv[]) { int ret; //用于联系上下文使用,就是串联各函数之间,让其他函数知道操作的是哪个 AVFormatCo 阅读全文
posted @ 2021-02-23 23:18 老年新手工程师 阅读(198) 评论(0) 推荐(0)