Results 1 to 2 of 2

Thread: [release/qrc_ICON.cpp] Error 1:File not found

  1. #1
    Join Date
    Apr 2012
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question [release/qrc_ICON.cpp] Error 1:File not found

    here is my code

    ICON.qrc
    Qt Code:
    1. <!DOCTYPE RCC><RCC version="1.0">
    2. <qresource>
    3. <file>images/accept.png</file>
    4. </qresource>
    5. </RCC>
    To copy to clipboard, switch view to plain text mode 

    main.cpp
    Qt Code:
    1. #include <QApplication>
    2. #include<QIcon>
    3. #include<QPushButton>
    4. #include<QAction>
    5.  
    6. int main( int argc, char** argv )
    7. {
    8. QApplication app( argc, argv );
    9.  
    10. QIcon w("/images/accept.png");
    11. QAction *b=new QAction(w,QString("Icon"),0);
    12.  
    13. a.addAction(b);
    14. a.show();
    15.  
    16. return app.exec();
    17. }
    To copy to clipboard, switch view to plain text mode 

    empty2.pro
    Qt Code:
    1. SOURCES += \
    2. main.cpp \
    3. buttondialog.cpp
    4.  
    5. HEADERS += \
    6. buttondialog.h
    7.  
    8. RESOURCES += \
    9. ICON.qrc
    To copy to clipboard, switch view to plain text mode 
    When I build the project,Qt Creator shows” [release/qrc_ICON.cpp] Error 1:File not found”.
    I don’t know why.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: [release/qrc_ICON.cpp] Error 1:File not found

    You must re-run qmake after changing the PRO file or the new build rules, in this case the one the processes the resource file, will not be present.

    BTW: Line 10 of main.cpp will not open the icon from the resource. Try ":/images/accept.png"

Similar Threads

  1. :-1: error: Package gstreamer-0.10 not found
    By casamensa in forum Newbie
    Replies: 2
    Last Post: 5th July 2012, 14:12
  2. : error: [\NokiaQtSDK\Symbian\SDK\epoc32\release\gcce\udeb\V ideo.exe] Error 1
    By ranjit.kadam in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st May 2011, 22:11
  3. -llua not found error
    By MarkoSan in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2011, 23:36
  4. Error while executing the exe release file
    By harmodrew in forum Newbie
    Replies: 7
    Last Post: 21st September 2010, 10:21
  5. Entry Point Not Found Error
    By ToddAtWSU in forum Newbie
    Replies: 10
    Last Post: 8th February 2006, 18:31

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.