保定网站开发培训,百度app下载安装,wordpress在线支付,网站建设中ftp起什么作用程序示例精选 QTC桌面程序窗体框架模板-中英文切换-文件打开历史记录-工具选项设置 如需安装运行环境或远程调试#xff0c;见文章底部个人QQ名片#xff0c;由专业技术人员远程协助#xff01; 前言
这篇博客针对《QTC桌面程序窗体框架模板-中英文切换-文件打开历史记录-… 程序示例精选 QTC桌面程序窗体框架模板-中英文切换-文件打开历史记录-工具选项设置 如需安装运行环境或远程调试见文章底部个人QQ名片由专业技术人员远程协助 前言
这篇博客针对《QTC桌面程序窗体框架模板-中英文切换-文件打开历史记录-工具选项设置》编写代码代码整洁规则易读。 学习与应用推荐首选。 运行结果 文章目录
一、所需工具软件 二、使用步骤 1. 主要代码 2. 运行结果 三、在线协助
一、所需工具软件 1. VS2019, Qt 2. C
二、使用步骤
代码如下示例 #include parametersetting.h
#include ui_parametersetting.hParameterSetting::ParameterSetting(QWidget *parent) :QWidget(parent),ui(new Ui::ParameterSetting)
{ui-setupUi(this);//QObject::connect(ui-pushButtonSetting, SIGNAL(clicked()), this, SLOT(on_settingConfirm_clicked()));QObject::connect(ui-pushButtonSetting, SIGNAL(clicked()), this, SLOT(settingConfirm_clicked()));QObject::connect(ui-pushButton, SIGNAL(clicked()), this, SLOT(subwin1Click()));QObject::connect(ui-pushButton_2, SIGNAL(clicked()), this, SLOT(subwin2Click()));QObject::connect(ui-pushButton_3, SIGNAL(clicked()), this, SLOT(subwin3Click()));QObject::connect(ui-pushButton_4, SIGNAL(clicked()), this, SLOT(subwin4Click()));QObject::connect(ui-pushButton_5, SIGNAL(clicked()), this, SLOT(subwin5Click()));QObject::connect(ui-pushButton_7, SIGNAL(clicked()), this, SLOT(subwin6Click()));QObject::connect(ui-pushButton_8, SIGNAL(clicked()), this, SLOT(subwin7Click()));QObject::connect(ui-pushButton_9, SIGNAL(clicked()), this, SLOT(subwin8Click()));QObject::connect(ui-pushButton_6, SIGNAL(clicked()), this, SLOT(subwin9Click()));QObject::connect(ui-pushButton_10, SIGNAL(clicked()), this, SLOT(subwin10Click()));QObject::connect(ui-pushButton_12, SIGNAL(clicked()), this, SLOT(subwin11Click()));QObject::connect(ui-pushButton_11, SIGNAL(clicked()), this, SLOT(subwin12Click()));ParameterSetting::~ParameterSetting()
{delete ui;
}void ParameterSetting::settingConfirm_clicked()
{QString X_RangeMax ui-lineEdit-text();QString X_RangeMin ui-lineEdit_4-text();QString Y_RangeMax ui-lineEdit_2-text();QString Y_RangeMin ui-lineEdit_5-text();qDebug()X_RangeMax: X_RangeMax;qDebug()X_RangeMin: X_RangeMin;qDebug()Y_RangeMax: Y_RangeMax;qDebug()Y_RangeMin: Y_RangeMin;std::ofstream cfgFile(config.cfg);if (!cfgFile) {std::cerr Cannot open the file for writing. std::endl;return;}cfgFile setting1X_RangeMax.toStdString() std::endl;cfgFile setting2X_RangeMin.toStdString() std::endl;cfgFile setting3Y_RangeMax.toStdString() std::endl;cfgFile setting4Y_RangeMin.toStdString() std::endl;cfgFile.close();close(); }#if 1
void ParameterSetting::onButtonClicked()
{//ui-pushButton-setStyleSheet(QPushButton { background-color: #FFFFFF; font-family: Microsoft YaHei; font-size: 12px;border: none; width:50px;height:30px});QPushButton* clickedButton qobject_castQPushButton*(sender());if (clickedButton) {if (lastClickedButton) {lastClickedButton-setStyleSheet(QPushButton { background-color: #E1E1E1; font-family: Microsoft YaHei; font-size: 12px; border: none;width:50px;height:30px});}clickedButton-setStyleSheet(QPushButton { background-color: rgb(161,216,232); font-family: Microsoft YaHei; font-size: 12px; border: none;width:50px;height:30px});lastClickedButton clickedButton;}
}void ParameterSetting::subwin1Click()
{qDebug() bbb;ui-stackedWidget-update();ui-stackedWidget-setCurrentIndex(0);}void ParameterSetting::subwin2Click()
{qDebug() aaa;ui-stackedWidget-update();ui-stackedWidget-setCurrentIndex(1);
}void ParameterSetting::subwin3Click()
{qDebug() aaa;ui-stackedWidget-update();ui-stackedWidget-setCurrentIndex(2);
}void ParameterSetting::subwin4Click()
{qDebug() aaa;ui-stackedWidget-update();ui-stackedWidget-setCurrentIndex(3);
}#endif
运行结果 三、在线协助
如需安装运行环境或远程调试见文章底部个人 QQ 名片由专业技术人员远程协助 1远程安装运行环境代码调试 2Visual Studio, Qt, C, Python编程语言入门指导 3界面美化 4软件制作 5云服务器申请 6网站制作 当前文章连接https://blog.csdn.net/alicema1111/article/details/132666851 个人博客主页https://blog.csdn.net/alicema1111?typeblog 博主所有文章点这里https://blog.csdn.net/alicema1111?typeblog
博主推荐 Python人脸识别考勤打卡系统 https://blog.csdn.net/alicema1111/article/details/133434445 Python果树水果识别https://blog.csdn.net/alicema1111/article/details/130862842 PythonYolov8Deepsort入口人流量统计https://blog.csdn.net/alicema1111/article/details/130454430 PythonQt人脸识别门禁管理系统https://blog.csdn.net/alicema1111/article/details/130353433 PythonQt指纹录入识别考勤系统https://blog.csdn.net/alicema1111/article/details/129338432 Python Yolov5火焰烟雾识别源码分享https://blog.csdn.net/alicema1111/article/details/128420453 PythonYolov8路面桥梁墙体裂缝识别https://blog.csdn.net/alicema1111/article/details/133434445