Results 1 to 8 of 8

Thread: How to regenared files?

  1. #1
    Join Date
    Aug 2009
    Posts
    30
    Thanks
    13
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Unhappy How to regenared files?

    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
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2010-07-21T13:38:56
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT += core gui
    8.  
    9. TARGET = OutOfMemoryBoard
    10. TEMPLATE = app
    11.  
    12. SOURCES += main.cpp\
    13. board.cpp \
    14. imagecapture.cpp
    15.  
    16. HEADERS += board.h \
    17. imagecapture.h
    18.  
    19.  
    20. FORMS += \
    21. board.ui
    22.  
    23. INCLUDEPATH += "C:\OpenCV2.1\include\opencv"
    24. LIBS += -L"C:\OpenCV2.1\lib" -lcv210 -lcvaux210 -lhighgui210 -lcxcore210
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to regenared files?

    Run qmake and then run rebuild

  3. The following user says thank you to squidge for this useful post:

    shenakan (6th August 2010)

  4. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to regenared files?

    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)

  5. The following user says thank you to Zlatomir for this useful post:

    shenakan (6th August 2010)

  6. #4
    Join Date
    Aug 2009
    Posts
    30
    Thanks
    13
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: How to regenared files?

    you right !! But when I did this. It doesn't find my #include "ui_board.h" in my program...

  7. #5
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to regenared files?

    But the "ui_board.h" is in the ProjectName-build-desktop folder?

  8. The following user says thank you to Zlatomir for this useful post:

    shenakan (6th August 2010)

  9. #6
    Join Date
    Aug 2009
    Posts
    30
    Thanks
    13
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: How to regenared files?

    ok that works finaly like you said. sorry

  10. #7
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to regenared files?

    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)

  11. #8
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to regenared files?

    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.

Similar Threads

  1. Replies: 9
    Last Post: 28th April 2010, 09:18
  2. Replies: 1
    Last Post: 11th November 2009, 12:22
  3. Replies: 12
    Last Post: 17th June 2009, 05:34
  4. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  5. how to save sequences of text files and sound files
    By nagpalma in forum Qt Programming
    Replies: 8
    Last Post: 3rd July 2007, 00:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.