Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to have qmake made aware of QT Designer form changes?

How to have qmake made aware of QT Designer form changes?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 229 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rjmoses
    wrote on last edited by
    #1

    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.cpp

    HEADERS +=
    MainWindow.h
    Maintenance.h

    FORMS +=
    IconOptionsDialog.ui
    MaintenanceAdd.ui
    MaintenanceDelete.ui
    mainwindow.ui

    include(../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);
    ...........

    aha_1980A 1 Reply Last reply
    0
    • R rjmoses

      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.cpp

      HEADERS +=
      MainWindow.h
      Maintenance.h

      FORMS +=
      IconOptionsDialog.ui
      MaintenanceAdd.ui
      MaintenanceDelete.ui
      mainwindow.ui

      include(../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);
      ...........

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @rjmoses,

      The simple answer is: qmake generates a Makefile. make then checks the timestamps of the xxxx.ui vs. the ui_xxxx.h and if the ui is newer, then uic 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

      Qt has to stay free or it will die.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved