How to have qmake made aware of QT Designer form changes?
-
I am working on a project that has multiple popup dialogs and noticed something curious in that I wanted to change the dialog box tab order and the changes where not detected by qmake/make.
I ran project clean, qmake, rebuild project and the changes where not detected. I played around with changing a lot little things such as font size, etc., to try to get the changes detected. I also deleted the complete build directory, all moc files, all .o files and still could not get the changes detected.
The symptom was that, when the dialog was invoked programmatically, it displayed the old dialog was displayed.
I finally did get it to recognize the changes, but I sure don't know what I did.
Any thoughts on how the QT Designer/qmake/make interact?
Thanks.
In the following code snippets , the culprit is "IconOptionsDialog....":
***********Project File: ****************
SOURCES +=
MainWindow.cpp
Maintenance.cpp
main.cppHEADERS +=
MainWindow.h
Maintenance.hFORMS +=
IconOptionsDialog.ui
MaintenanceAdd.ui
MaintenanceDelete.ui
mainwindow.uiinclude(../Common/Common.pri)
*******************Main Window invocation of Dialog *****************
void MainWindow::iconRightButton(QMouseEvent *event, IconLabel * child)
{
QDialog * widget = new QDialog(this);
Ui::IconOptionsDialog d_ui;
d_ui.setupUi(widget);
widget->setWindowTitle(child->m_fileName);
........... -
I am working on a project that has multiple popup dialogs and noticed something curious in that I wanted to change the dialog box tab order and the changes where not detected by qmake/make.
I ran project clean, qmake, rebuild project and the changes where not detected. I played around with changing a lot little things such as font size, etc., to try to get the changes detected. I also deleted the complete build directory, all moc files, all .o files and still could not get the changes detected.
The symptom was that, when the dialog was invoked programmatically, it displayed the old dialog was displayed.
I finally did get it to recognize the changes, but I sure don't know what I did.
Any thoughts on how the QT Designer/qmake/make interact?
Thanks.
In the following code snippets , the culprit is "IconOptionsDialog....":
***********Project File: ****************
SOURCES +=
MainWindow.cpp
Maintenance.cpp
main.cppHEADERS +=
MainWindow.h
Maintenance.hFORMS +=
IconOptionsDialog.ui
MaintenanceAdd.ui
MaintenanceDelete.ui
mainwindow.uiinclude(../Common/Common.pri)
*******************Main Window invocation of Dialog *****************
void MainWindow::iconRightButton(QMouseEvent *event, IconLabel * child)
{
QDialog * widget = new QDialog(this);
Ui::IconOptionsDialog d_ui;
d_ui.setupUi(widget);
widget->setWindowTitle(child->m_fileName);
...........Hi @rjmoses,
The simple answer is:
qmake
generates aMakefile
.make
then checks the timestamps of thexxxx.ui
vs. theui_xxxx.h
and if theui
is newer, thenuic
is called to generate a new header.Your scenario can happen if e.g. the files are located on a network share and the timestamps don't match, or if you have build artifacts or Makefiles in your source folder that even if you do shadow building. At least I have seen these two cases.
Regards