×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    19

    package app with icons

    Hi!

    What is the good way for packaging an application which use is own icons ?

    I using my icons like that in project file:
    Code:
    unix {
        isEmpty(PREFIX) {
            PREFIX = /usr/local
        }
        BINDIR = $$PREFIX/bin
        DATADIR =$$PREFIX/share
    
        DEFINES += DATADIR=\"$$DATADIR\" PKGDATADIR=\"$$PKGDATADIR\"
    
        ............
            
        icon64.path = $$DATADIR/icons/hicolor/64x64/apps
        icon64.files += ../data/64x64/myapp_icon1.png \
                        ../data/64x64/myapp_icon2.png \
                        ../data/64x64/myapp_icon3
    }

    And in the Qt code like that:
    Code:
    QIcon icon1("/usr/share/icons/hicolor/64x64/apps/myapp_icon1.png");
    QIcon icon1("/usr/share/icons/hicolor/64x64/apps/myapp_icon2.png");
    QIcon icon1("/usr/share/icons/hicolor/64x64/apps/myapp_icon3.png");
    Thanks!

  2. #2
    Registered User
    Join Date
    Nov 2009
    Posts
    15

    Re: package app with icons

    I normally use ressources for icons and small graphics:

    http://doc.trolltech.com/4.6/designer-resources.html

    So you don't have to care about installing the graphics, optification etc.
    Peter
    ***********************************************************
    Das deutschsprache Forum für mobile Qt-Entwickler:
    http://mobileqt.de
    ***********************************************************

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: package app with icons

    Yes, it's common in Qt to embed files into a binary file.
    Better link as I guess you are not using Qt Designer:
    http://doc.trolltech.com/4.6/resources.html

  4. #4
    Registered User
    Join Date
    Jan 2010
    Posts
    19

    Re: package app with icons

    Yes, Debian packaging of an application using icons within a Ressource file works well.
    Thanks!

Similar Threads

  1. Replies: 5
    Last Post: 2010-03-11, 13:04
  2. Replies: 1
    Last Post: 2008-08-21, 12:29
  3. Replies: 6
    Last Post: 2008-08-07, 10:31
  4. Dialog's clipping area (again). Nokia experts, please help
    By synov in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-06-26, 14:35
  5. MIDP 2.0 games.* package on MIDP 1.0 app?
    By baegsi in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-03, 14:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×