Results 1 to 4 of 4

Thread: QT must clean project to rebuild QML file changes

  1. #1
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default QT must clean project to rebuild QML file changes

    Hi all,

    I've faced a problem:
    I write code in a project with QML file. When I change the QML file, the changes does not effect to the project when I press Run. And I have to "Clean" the project and rebuild, it takes time.

    Anyone who have experience, could you show me the solution, many thanks for you

  2. #2
    Join Date
    Nov 2011
    Posts
    17
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT must clean project to rebuild QML file changes

    I think this link below is helpful for you, check it man
    http://zchydem.enume.net/2011/08/04/...n-every-build/

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

    xman_ss (24th November 2011)

  4. #3
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QT must clean project to rebuild QML file changes

    I think better solution is to store QML files as regular files not in Qt resurces (Qt resurces makes file part of binary file).

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

    xman_ss (24th November 2011)

  6. #4
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Smile Re: QT must clean project to rebuild QML file changes

    Quote Originally Posted by duc_bkav View Post
    I think this link below is helpful for you, check it man
    http://zchydem.enume.net/2011/08/04/...n-every-build/
    Thanks duc_bkav,

    I follow the instruction in your link, but it does not work, even if I manually run the command "touch quickflickr.png" before building the project .


    Added after 4 minutes:


    Quote Originally Posted by MarekR22 View Post
    I think better solution is to store QML files as regular files not in Qt resurces (Qt resurces makes file part of binary file).
    Thanks MarekR22, I found this solution solved the problem.

    My code is

    Qt Code:
    1. QDeclarativeView view3;
    2. view3.setSource(QUrl::fromLocalFile("UI/testWithQML.qml"));
    3. view3.show();
    To copy to clipboard, switch view to plain text mode 

    In my code, I use QUrl::fromLocalFile instead of using resource.
    With this solution, I have to copy qml files to the destionation directory by add some command in build steps
    Last edited by xman_ss; 24th November 2011 at 03:25.

Similar Threads

  1. Project file to compile c++ file
    By hojoff79 in forum Newbie
    Replies: 1
    Last Post: 9th March 2011, 17:43
  2. Replies: 8
    Last Post: 24th November 2010, 10:34
  3. Replies: 3
    Last Post: 3rd August 2010, 13:12
  4. Replies: 1
    Last Post: 3rd December 2009, 23:34
  5. Clean project deletes makefile
    By Djony in forum Qt Programming
    Replies: 2
    Last Post: 7th December 2006, 10:15

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.