QtCreator Build 不会更新设计表单中的 UI 更改 [英] QtCreator Build doesn't update UI changes in design form
问题描述
我的 Qt 项目使用影子构建.
当我更改 MainWindow 表单(.ui 文件)时,我构建了项目,但我的程序没有更新 GUI.
如果我全部重建,GUI 将被更新.但是重建非常非常慢.
我尝试创建一个新项目(一个带有一些标签的空 QMainWindow),我修改了一些文本.我构建并更新了 GUI.
My Qt project uses shadow build.
When I change in MainWindow form ( .ui file), I build the project but my program doesn't update GUI.
If I rebuild all, GUI will be updated. But rebuild is very very slow.
I try creating a new project (an empty QMainWindow with some labels), I modify some texts. I build and GUI is updated.
如何在不重建所有项目的情况下正确使用影子构建?
How can I use shadow build correctly, without a rebuild of all my project?
推荐答案
如果 *.ui
文件名更改,也会出现同样的问题.
The same issue occurs if the *.ui
file name is changed.
例如,将 yourUi.ui
更改为 myUi.ui
.
For example, Changing yourUi.ui
to myUi.ui
.
如果是这种情况,那么ui_*.h
也应该改,即yourUi.ui
为ui_myUi.h
>.
If that is the scenario, then the ui_*.h
should also be changed, that is, yourUi.ui
to ui_myUi.h
.
这篇关于QtCreator Build 不会更新设计表单中的 UI 更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!