UI not updated after clean & rebuild
-
Hi,
I am using QT Creator 2.3.1 to modify GUI of an old QT project.
Using UI Property Editor, I tried to change a checkbox from "not checked" to "checked" by default. Then "clean all" and "build all". But the setting does not change, the checkbox is still unchecked. The mainwindow.ui file has re-generated correct XML
But the output GUI is incorrect. Is that something wrong with auto-generated moc_mainwindow.cpp? What is the correct step i should follow to update the GUI successfully? -
Running build steps for project visualizer...
Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe" clean
C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Debug clean
mingw32-make[1]: Entering directoryC:/visualizer-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug' del debug\moc_networktester.cpp debug\moc_network.cpp debug\moc_mainwindow.cpp debug\moc_display.cpp del ui_networktester.h ui_mainwindow.h del debug\main.o debug\mainwindow.o debug\variableanimation.o debug\networktester.o debug\network.o debug\display.o debug\moc_networktester.o debug\moc_network.o debug\moc_mainwindow.o debug\moc_display.o mingw32-make[1]: Leaving directory
C:/visualizer-build-desktop-Qt_4_7_4_for_Desktop_-MinGW_4_4__Qt_SDK__Debug'
C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Release clean
mingw32-make[1]: Entering directoryC:/visualizer-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug' del release\moc_networktester.cpp release\moc_network.cpp release\moc_mainwindow.cpp release\moc_display.cpp del ui_networktester.h ui_mainwindow.h del release\main.o release\mainwindow.o release\variableanimation.o release\networktester.o release\network.o release\display.o release\moc_networktester.o release\moc_network.o release\moc_mainwindow.o release\moc_display.o Could Not Find C:\\visualizer-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\release\moc_networktester.cpp Could Not Find C:\visualizer-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\ui_networktester.h mingw32-make[1]: Leaving directory
C:/visualizer-build-desktop-Qt_4_7_4_for_Desktop-MinGW_4_4__Qt_SDK__Debug'
Could Not Find C:\visualizer-build-desktop-Qt_4_7_4_for_Desktop-_MinGW_4_4__Qt_SDK__Debug\release\main.o
The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited normally. -
Running build steps for project visualizer...
Configuration unchanged, skipping qmake step.
Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/visualizer-build-desktop-Qt_4_7_4_for_Desktop_-MinGW_4_4__Qt_SDK__Debug'
c:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\uic.exe ..\visualizer\networktester.ui -o ui_networktester.h
c:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\uic.exe ..\visualizer\mainwindow.ui -o ui_mainwindow.h
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\main.o ..\visualizer\main.cpp
..\visualizer\mainwindow.ui: Warning: The name 'layoutWidget' (QWidget) is already in use, defaulting to 'layoutWidget1'.
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\mainwindow.o ..\visualizer\mainwindow.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\variableanimation.o ..\visualizer\variableanimation.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\networktester.o ..\visualizer\networktester.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\network.o ..\visualizer\network.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\display.o ..\visualizer\display.cpp
C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -D__GNUC_ -DWIN32 ..\visualizer\networktester.h -o debug\moc_networktester.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\moc_networktester.o debug\moc_networktester.cpp -
C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\visualizer\network.h -o debug\moc_network.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\moc_network.o debug\moc_network.cpp
C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\visualizer\mainwindow.h -o debug\moc_mainwindow.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\moc_mainwindow.o debug\moc_mainwindow.cpp
C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\visualizer\display.h -o debug\moc_display.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\visualizer" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\moc_display.o debug\moc_display.cpp
g++ -mthreads -Wl,-subsystem,windows -o debug\visualizer.exe object_script.visualizer.Debug -L"c:\QtSDK\Desktop\Qt\4.7.4\mingw\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtNetworkd4 -lQtCored4 -LC:\OpenSSL-Win32_full\lib
mingw32-make[1]: Leaving directory `C:/visualizer-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug'
The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited normally. -
First of all I don't think that reporting all the compile output could help in this case.
However on the right side of the UI editor you have a property editor, scroll it until you find the "checked" property and mark it as true. Of course having the checkbox selected in the form. It worked fine for me.
Now things I will look if it does not work:having an instance of the application still running that prevents the modification of the file
having some code that interferes with the checkbox, such as @ui->checkbox->setChecked( false );@ somewhere else in your application
having selected the wrong checkbox in the form editor