Why qt creator stops to update the header file for the UI?
-
I don't why but it seems that my qt creator stops to update the header file for the ui when I add some one element in the UI edit window of the qt creator.
It's like: I create a UI called userwindow in the UI design window. QT creator generates the two files for me:
userwindow.ui
ui_userwindow.h
Everything worked fine, but now, when I add some elements in the userwindow, I use @ui->@ to locate those elements,but I failed.So now, in my qt creator design window, the UIs are all right. However, I can't locate the new-added element and therefore cannot operate them.
Any one has similar experience? Or is there any method to ask qt creator to update the ui_userwindow.h file??
Many thanks.
-
Thanks for the help.
-to HuxiKa
I tried rebuild and run, but it does not work.-to Eddy
I only open one project. Though, i did open several qt creators to edit a same project at the same time.
But now, I only open one creator and one project, it still does not work.-- -
i found something in the compile output:
@make: Leaving directory `/home/sz/Programming/codes/EC-build-desktop'
make: *** [userwindow.o] Error 1
The process "/usr/bin/make" exited with code 2.
Error while building project EC (target: Desktop)
When executing build step 'Make'@it seems the make cannot generate the userwindow.o.
-
Complier Output: (sorry about so many warnings)
@Running build steps for project EC...
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w
make: Entering directory/home/sz/Programming/codes/EC-build-desktop' /home/sz/Programming/QtSDK/Desktop/Qt/473/gcc/bin/qmake -spec ../../QtSDK/Desktop/Qt/473/gcc/mkspecs/linux-g++ CONFIG+=debug -o Makefile ../EC/EC.pro make: Leaving directory
/home/sz/Programming/codes/EC-build-desktop'
make: Entering directory/home/sz/Programming/codes/EC-build-desktop' /home/sz/Programming/QtSDK/Desktop/Qt/473/gcc/bin/uic ../EC/ec.ui -o ui_ec.h /home/sz/Programming/QtSDK/Desktop/Qt/473/gcc/bin/uic ../EC/adminwindow.ui -o ui_adminwindow.h /home/sz/Programming/QtSDK/Desktop/Qt/473/gcc/bin/uic ../EC/userwindow.ui -o ui_userwindow.h g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -I../../QtSDK/Desktop/Qt/473/gcc/mkspecs/linux-g++ -I../EC -I../../QtSDK/Desktop/Qt/473/gcc/include/QtCore -I../../QtSDK/Desktop/Qt/473/gcc/include/QtGui -I../../QtSDK/Desktop/Qt/473/gcc/include -I/usr/include/cryptopp -I. -I. -I../EC -I. -o main.o ../EC/main.cpp In file included from ../EC/adminwindow.h:8, from ../EC/ec.h:5, from ../EC/main.cpp:2: (the message has too many warnings , i have to delete them to fit in the post) make: Leaving directory
/home/sz/Programming/codes/EC-build-desktop'
make: *** [userwindow.o] Error 1
The process "/usr/bin/make" exited with code 2.
Error while building project EC (target: Desktop)
When executing build step 'Make'@ -
Sorry, you just cut the actual error message.
You must not change the ui_xxx.h files manually, as they are regenerated by uic for certain reasons.
If you move out your own class definition into another header file, make sure you
- #include that file where you included the ui_xxx.h file
- have "include guards":http://en.wikipedia.org/wiki/Include_guard in that file and make sure they are different from the other one!