KDE

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Usage of Qt resources with CMake

    8 answers - 486 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Question number two.
    As it turned out, Qt now uses resource-files to store icons/pixmaps etc.
    And one of kbattleship ui-forms contains some pixmap labels.
    What is the right way to convert it? Should I create a 'qrc' file as described
    in porting docs? Then how to tell cmake about its existence?
    I need to take some other route? :)
    Thanks in advance,
    Dmitry.

    >Visit #unsub to unsubscribe <<
  • No.1 | | 754 bytes | |

    A Dimarts 16 Maig 2006 18:54, Dmitry Suzdalev va escriure:
    Question number two.

    As it turned out, Qt now uses resource-files to store icons/pixmaps etc.
    And one of kbattleship ui-forms contains some pixmap labels.
    What is the right way to convert it? Should I create a 'qrc' file as
    described in porting docs? Then how to tell cmake about its existence?

    I need to take some other route? :)

    Well, AFAIK the KDE way was not embedding images in ui files and shipping them
    as separate files.

    Albert

    Thanks in advance,
    Dmitry.
    >
    >Visit #unsub to
    >unsubscribe <<


    >Visit #unsub to unsubscribe <<
  • No.2 | | 613 bytes | |

    Tuesday 16 May 2006 22:38, Albert Astals Cid wrote:
    Well, AFAIK the KDE way was not embedding images in ui files and shipping
    them as separate files.
    So should I insert corresponding pngs/code?
    better contact the maintainer? :)

    Btw, is there some common rule to load images into apps? I mean some naming
    scheme (like with icons) or some kdelibs classes to use with this task?
    it is sufficient to give pngs some meaningful name and use QPixmap's
    loading functions? :)

    Thanks.
    Dmitry.

    >Visit #unsub to unsubscribe <<
  • No.3 | | 766 bytes | |

    Tuesday 16 May 2006 22:34, Dmitry Suzdalev wrote:
    Tuesday 16 May 2006 22:38, Albert Astals Cid wrote:
    Well, AFAIK the KDE way was not embedding images in ui files and shipping
    them as separate files.
    So should I insert corresponding pngs/code?
    better contact the maintainer? :)

    Btw, is there some common rule to load images into apps? I mean some naming
    scheme (like with icons) or some kdelibs classes to use with this task?
    it is sufficient to give pngs some meaningful name and use QPixmap's
    loading functions? :)

    You should use KIconLoader (e.g. via KGlobal::iconLoader()-or the static functions
    in kiconloader.h) to load the icons, so that icon themes work.
    For large images you probably want to use UserIcon().
  • No.4 | | 582 bytes | |

    Wednesday 17 May 2006 12:26, David Faure wrote:
    You should use KIconLoader (e.g. via KGlobal::iconLoader()-or the static
    functions in kiconloader.h) to load the icons, so that icon themes work.
    For large images you probably want to use UserIcon().
    Hmm, are you sure? I meant not icons, but a custom pixmaps. There's no need to
    support "icon themes" there :).
    Maybe I wasn't very clear. Well, for example, will KTip use KIconLoader to
    load the image of a light bulb?

    >Visit #unsub to unsubscribe <<
  • No.5 | | 746 bytes | |

    Wednesday 17 May 2006 18:41, Dmitry Suzdalev wrote:
    Wednesday 17 May 2006 12:26, David Faure wrote:
    You should use KIconLoader (e.g. via KGlobal::iconLoader()-or the static
    functions in kiconloader.h) to load the icons, so that icon themes work.
    For large images you probably want to use UserIcon().
    Hmm, are you sure? I meant not icons, but a custom pixmaps. There's no need to
    support "icon themes" there :).
    Maybe I wasn't very clear. Well, for example, will KTip use KIconLoader to
    load the image of a light bulb?

    kiconloader's UserIcon can be used for loading custom pixmaps,
    but you're right, ktip uses QPixmap(locate("data", "kdeui/pics/ktip-bulb.png")) for
    loading the bulb image.
  • No.6 | | 1156 bytes | |

    Wednesday 17 May 2006 21:14, David Faure wrote:
    Wednesday 17 May 2006 18:41, Dmitry Suzdalev wrote:
    Wednesday 17 May 2006 12:26, David Faure wrote:
    You should use KIconLoader (e.g. via KGlobal::iconLoader()-or the
    static functions in kiconloader.h) to load the icons, so that icon
    themes work. For large images you probably want to use UserIcon().

    Hmm, are you sure? I meant not icons, but a custom pixmaps. There's no
    need to support "icon themes" there :).
    Maybe I wasn't very clear. Well, for example, will KTip use KIconLoader
    to load the image of a light bulb?

    kiconloader's UserIcon can be used for loading custom pixmaps,
    but you're right, ktip uses QPixmap(locate("data",
    "kdeui/pics/ktip-bulb.png")) for loading the bulb image.
    Thanks for pointing that out, as I had difficulties locating ktip source :).
    Ah, those newbies ;)

    So, is it okay if I'll convert the form to use QPixmap's loading functions
    (this seems more logical to me than using KIconLoader)?

    Dmitry.

    >Visit #unsub to unsubscribe <<
  • No.7 | | 1233 bytes | |

    Wednesday 17 May 2006 19:37, Dmitry Suzdalev wrote:
    Wednesday 17 May 2006 21:14, David Faure wrote:
    Wednesday 17 May 2006 18:41, Dmitry Suzdalev wrote:
    Wednesday 17 May 2006 12:26, David Faure wrote:
    You should use KIconLoader (e.g. via KGlobal::iconLoader()-or the
    static functions in kiconloader.h) to load the icons, so that icon
    themes work. For large images you probably want to use UserIcon().

    Hmm, are you sure? I meant not icons, but a custom pixmaps. There's no
    need to support "icon themes" there :).
    Maybe I wasn't very clear. Well, for example, will KTip use KIconLoader
    to load the image of a light bulb?

    kiconloader's UserIcon can be used for loading custom pixmaps,
    but you're right, ktip uses QPixmap(locate("data",
    "kdeui/pics/ktip-bulb.png")) for loading the bulb image.
    Thanks for pointing that out, as I had difficulties locating ktip source :).
    Ah, those newbies ;)
    ;) kdelibs/kdeui

    So, is it okay if I'll convert the form to use QPixmap's loading functions
    (this seems more logical to me than using KIconLoader)?

    Yes - making sure you use KStandardDirs or its locate() global function
    to locate the icon.
  • No.8 | | 701 bytes | |

    Wednesday 17 May 2006 23:37, David Faure wrote:
    Thanks for pointing that out, as I had difficulties locating ktip source
    :). Ah, those newbies ;)

    ;) kdelibs/kdeui
    And I was searching kdebase for it :).

    So, is it okay if I'll convert the form to use QPixmap's loading
    functions (this seems more logical to me than using KIconLoader)?

    Yes - making sure you use KStandardDirs or its locate() global function
    to locate the icon.
    Wow, David, you answer the questions that I have in my head in advance (like
    the "where that locate() comes from?" one) ;).

    Thanks!

    >Visit #unsub to unsubscribe <<

Re: Usage of Qt resources with CMake


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 4 =
QUESTION ON "KDE"

EMSDN.COM