03 2021 档案
摘要:代码实现 1 #include "timerun.h" 2 #include "ui_timerun.h" 3 4 timerun::timerun(QWidget *parent) : 5 QMainWindow(parent), 6 ui(new Ui::timerun), 7 mtime(0,
阅读全文
摘要:1,显示效果 2,页面布局 显示控件选择LCD Numer digitCount默认为5,不够用调整为10 3,具体代码 1 #include "timeshow.h" 2 #include "ui_timeshow.h" 3 4 timeshow::timeshow(QWidget *parent
阅读全文
摘要:listWidget中可以添加字符串,按钮等控件,以及自定义控件 首先定义QListWidgetItem,然后将所要添加的控件一起加入到listWidget 代码实现: 1,字符串 1 void ListW::on_btnstring_clicked() 2 { 3 ui->listWidget->
阅读全文
摘要:1,显示效果 2,页面编辑方式,画好页面之后转到槽函数 3,各个槽函数代码简单实现 3.1,打开 1 void Filewin::on_actionopen_triggered() 2 { 3 QString fitler=QString("Text from(*.cpp *.h)"); 4 fil
阅读全文
摘要://单击按钮显示目录下所有文件槽函数 void filewindow::on_pushButton_clicked() { //获取对话框路径 QString dirpath=QFileDialog::getExistingDirectory(this,"choose directory","./"
阅读全文