当前位置:网站首页>qt解决每次修改完ui文件都要重新构建的问题
qt解决每次修改完ui文件都要重新构建的问题
2022-07-28 05:25:00 【小土同学!】
前言
qt creator在使用上有许多体验很差的地方,qt designer每次修改完ui文件都要重新构建后,代码中才能识别ui文件里的内容,体验感很差
采用动态加载UI文件并生成界面
实现方法:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// MainWindow w;
// w.show();
QUiLoader loader;
QFile file("mainwindow.ui");
loader.load(&file)->show();
return a.exec();
}
只需修改main函数即可,需要在配置文件中添加CONFIG += uitools
这样每次修改完ui文件,就不用重写编译
边栏推荐
- set_ false_ path
- Perl入门学习(十)格式化输出
- 毕业论文 | 文献综述应该怎么写
- Best practices to ensure successful deployment of Poe devices
- Learning notes of hardware circuit design 1 -- temperature rise design
- 解决内存占用比应用进程占用高的问题
- What happens when MySQL tables change from compressed tables to ordinary tables
- Why should fluke dsx2-5000 network cable tester be calibrated once a year?
- 论文神器 VS Code + LaTex + LaTex Workshop
- Matlab simulation of radar imaging 4 - range resolution analysis
猜你喜欢

Cronbach’s α?KMO系数?因子载荷?史上最易懂的问卷信效度分析教程!!!(SPSS和AMOS)

A NOVEL DEEP PARALLEL TIME-SERIES RELATION NETWORK FOR FAULT DIAGNOSIS

mixup_ ratio

clock tree分析实例

Machine learning note 5 - logistic regression

Vs code basic configuration and beautification

Graduation thesis | how to write literature review

Matlab simulation of radar imaging 2 - pulse compression and windowing

ConNeXt

clickhouse聚合之内存不足怎么办?那就提升聚合性能
随机推荐
Agilent Agilent e5071 test impedance and attenuation are normal, except crosstalk ng--- Repair plan
Perl入门学习(十)格式化输出
JSP实现文件上传功能的同时还要向后台传递参数
Perl入门学习(八)子程序
听说你也在实习|当我采访了几个大三实习生之后。
ICC2分析时序的神器 analyze_design_violations
Terminal resistance detailed signal complete series hardware learning notes 7
Word自动目录字体修改和行间距的问题
How to view the transfer function of the module directly built by Simulink
PyTorch 学习笔记 2 —— About Tensor
Vs code basic configuration and beautification
Cautious speculation about fusion on Apple silicon
USB network native driver for esxi updated to support esxi7.0.1
Matlab simulation of radar imaging 2 - pulse compression and windowing
ConNeXt
论文神器 VS Code + LaTex + LaTex Workshop
当mysql表从压缩表变成普通表会发生什么
Systemmediasize startup option added in esxi 7.0 update 1C
An example of bill printing
Esxi on arm 10/22 update