Results 1 to 17 of 17

Thread: Icons are not visible when installing Qt application on end user machine ( Windows )

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Posts
    72
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    So what does it mean?
    That I can't compile my application ones and install ( deploy ) on another machines with needed windows dlls with the icons seen?
    I begin to think the Qt developers make this so as not to make possible to redistribute made programs under GPL?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    Please don't multi post.
    Merging.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jul 2010
    Posts
    72
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Lightbulb Re: Icons are not visible when installing Qt application on end user machine ( Window

    Hi
    The resources were compiled to exe sure there is coded images as hexadecimal numbers in .cpp file

    Regards codecs... perhaps it is the problem? I will check the plugins, but No - so Why when I deploy exe to ../Qt/2010.05/qt/bin the icons are visible?


    Added after 4 minutes:


    I have tried also to deploy with dlls from plugins/codecs , plugins/imageformats, plugins/iconengines but still I can't see icons
    I can see only when I install full Qt SDK and I deploy to qt/bin directory
    But we understand the end user should not install full Qt SDK so as to use application
    why such a problem?>
    Last edited by freely; 18th February 2011 at 11:41.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    Are the Qt Dlls and your exe in the same folder?
    If not, you need to set the environment path as well.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jul 2010
    Posts
    72
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    Sure My dll's and exe and all files are in one bundle(folder)

    sure dll's for the application, .exe, application service files installed in one folder to HDD to end user, the application is succeed to launch but icons not visible in places that I have included them

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    Do you have the following line in your pro file:
    RESOURCES = <you_resource_filename>.qrc

    Also, can you post one example line from your code, where you are accessing an image?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7
    Join Date
    Jul 2010
    Posts
    72
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    Hi
    Yes, sure
    the dlls, exe are in one folder, installed at end user machine to one folder
    I have added resources in .pro and also " registered " in main.cpp as it is explainded in Qt reference documentation

    Here is the example of image including from file generated by .uic after I've added icons in Qt Designer:


    Qt Code:
    1. QIcon icon1;
    2. icon1.addFile(QString::fromUtf8(":/Icons2/Tell a Friends.ico"), QSize(), QIcon::Normal, QIcon::Off);
    3. actionTell_a_friend->setIcon(icon1);
    4. actionContact_us = new QAction(MainWindow);
    5. actionContact_us->setObjectName(QString::fromUtf8("actionContact_us"));
    6. QIcon icon2;
    7. icon2.addFile(QString::fromUtf8(":/Icons2/Contact Us.ico"), QSize(), QIcon::Normal, QIcon::Off);
    8. actionContact_us->setIcon(icon2);
    9. actionQuit = new QAction(MainWindow);
    10. actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
    11. ...
    To copy to clipboard, switch view to plain text mode 
    Last edited by high_flyer; 20th February 2011 at 11:47. Reason: code tags

  8. #8
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    your app should be deployed like this:

    <app>.exe
    dlls that you listed before
    imageformats\qico4.dll

    hope this helps

  9. #9
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Icons are not visible when installing Qt application on end user machine ( Window

    Try renaming the icons to not include spaces.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 16
    Last Post: 21st January 2011, 09:15
  2. Replies: 3
    Last Post: 12th July 2010, 06:25
  3. Replies: 7
    Last Post: 29th January 2009, 19:47
  4. no icons on the another machine (after installation)
    By roxton in forum Installation and Deployment
    Replies: 2
    Last Post: 4th July 2008, 17:24
  5. installing and Qt3 and Qt4 in a single machine
    By joseph in forum Installation and Deployment
    Replies: 1
    Last Post: 20th June 2007, 13:58

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.