Qt Creator 2.0: UI layout is not updated when running application



  • Doing a small application on Qt Creator 2.0 for Maemo and Symbian. The problem I can see pretty often is that when UI layout is changed in designer, it is not updated to the application when it is run. At the moment struggling to get UI changes working in Qt simulator and Nokia N97 hardware. Ui is just not getting updated. Rebuilding, cleaning the project doesn't help.

    Any hint how to force UI update?



  • Ok, thing I got it.

    The problem was that ui_mainwindow.h was generated to ui\folder; while the build system was using ui_mainwindow.h from the project root folder (the old one). Wonder why this even happening?



  • I had the same issue testing a small app on the simulator, the UI just doesn't change.
    Any easy fix?



  • You can try to specify explicitly UI_DIR in pro-file. Worked for me at least with desktop-application in similar problem.



  • [quote author="mtilli" date="1283985642"]You can try to specify explicitly UI_DIR in pro-file. Worked for me at least with desktop-application in similar problem.[/quote]

    ah I'll try this next time. Similar issue also addressed in this "thread":http://developer.qt.nokia.com/forums/viewthread/808/



  • If you don't set UI_DIR env variable explicitly, @#include "ui_mainwindow.h"@ tries including root folder's first.

    Check your other build settings. In case of Nokia Qt SDK default setting, simulator's build setting doesn't set UI_DIR then use root(but seperated build path) folder's.



  • I am having this same problem, suddenly started happening today--I have changed controls on my ui form, but when I run, these changes are not there. I changed the fonts on several controls, the text on two buttons, added two checkboxes. What I have tried:

    • Close and restart Qt Creator.
    • Clean All, then Rebuild All.
    • Tried Release & Debug.
    • Added line to .pro file: UI_DIR = C:\Users\ron\Documents\Projects\Qt\Gauge Monitor

    What has changed since it was working a few days ago, is that I set up everything to get my debugger working. Can't think of anything else that has changed. I am using Qt Creator 3.0.1 for Windows, Desktop_Qt_5_2_1_MinGW_32bit. Any ideas?

    Thanks
    Ron



  • Ok, I got rid of that problem (in Release) by deleting Makefile, Makefile.Debug, Makefile.Release, and ui_GaugeMon.h from my project folder. I recently specified that these be built somewhere else and checked Shadow Build. But now when I try to compile in Debug, I get:

    :-1: error: No rule to make target '../Gauge Monitor/ui_GaugeMon.h', needed by 'debug/GaugeMon.o'. Stop.

    Aaarrggh! This really frustrates me sometimes. I don't know what this means.
    Ron


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.