概述
最近花了好几天的时间编写了一个专利文件检索的程序,通过Qt完成了PC端程序,因为以前写过Qt,所以这次可以说是极为顺利了,不过忘记了很多东西,所以需要记录
也希望能帮助到广大网友,会继续更新的
打开窗口
不关闭原来的
Setting* set = new Setting();
set->show();
弹出消息框
下面代码会乱码 需要删除fromLocal8Bit
QMessageBox::information(this, QString::fromLocal8Bit("警告"),QString::fromLocal8Bit("有种你再点击一次"));
判断文件存在
QFileInfo fi("C:/123"); // 目录存在
qDebug() << fi.isFile(); // false
qDebug() << QFile::exists("C:/123"); // true
获取时间
QDateTime current_date_time =QDateTime::currentDateTime();
QString current_date =current_date_time.toString("yyyy.MM.dd hh:mm:ss.zzz ddd");
获取子控件
QList allCheckBox = ui->frame->findChildren();
for(int i = 0;i
{
if(allCheckBox.at(i)->isChecked