PDA

View Full Version : How to regenared files?



shenakan
5th August 2010, 23:28
I have a program with an interface board.ui

When I wanted to update the interphace with Qtcreator nothing happen : Old buttons were presents but not the last one...

I tried to rebuild the program but It was the same.

In fact the board_ui.h file was note updated.

So I tried to delete board_ui.h and now it is impossible to regenerate It. And now I become crasy !!

I really want to understand why!

I used qtcreator 2.0.1 on windows

This is my .pro


#-------------------------------------------------
#
# Project created by QtCreator 2010-07-21T13:38:56
#
#-------------------------------------------------

QT += core gui

TARGET = OutOfMemoryBoard
TEMPLATE = app

SOURCES += main.cpp\
board.cpp \
imagecapture.cpp

HEADERS += board.h \
imagecapture.h


FORMS += \
board.ui

INCLUDEPATH += "C:\OpenCV2.1\include\opencv"
LIBS += -L"C:\OpenCV2.1\lib" -lcv210 -lcvaux210 -lhighgui210 -lcxcore210

squidge
5th August 2010, 23:35
Run qmake and then run rebuild

Zlatomir
5th August 2010, 23:42
First try Run qmake (from the Build menu)

if that doesn't work i guess that you created the project with older version of Creator and now you opened with latest, then notice that the latest Creator makes <at least> two folders for your Project:
1 - ProjectName folder
2 - ProjectName-build-desktop folder

Navigate with explorer to the first one (ProjectName) and delete Debug/Release folders, make files, moc, and other generated files (make sure not to delete your code files or resources, project...) after that open the .pro file with Creator and build your app (the changes from .ui files should update now)

shenakan
5th August 2010, 23:55
you right !! But when I did this. It doesn't find my #include "ui_board.h" in my program...

Zlatomir
5th August 2010, 23:59
But the "ui_board.h" is in the ProjectName-build-desktop folder?

shenakan
6th August 2010, 00:01
ok that works finaly like you said. sorry

Zlatomir
6th August 2010, 00:06
It should work, they created a little "mess" right now with generated files in two folders, and sometimes the compiler takes the ones from ProjectName folder (witch are not updated) the tools only update the ones from ProjectName-build-...

But i think is better this way even if now some peoples have problems with that, with two folders you get the generated code separate from yours (i think it's a good thing)

Lykurg
6th August 2010, 06:24
If you want to define where your ui files should be stored you can also have a look at the qmake variable UI_DIR. MOC_DIR, OBJECTS_DIR and RCC_DIR might be also of interest.