Results 1 to 4 of 4

Thread: Pack all .qm files into .qrc, why doesn't work???

  1. #1
    Join Date
    May 2008
    Posts
    58
    Thanks
    2

    Default Pack all .qm files into .qrc, why doesn't work???

    I work with Qt4.3.2 + VSS .net 2005
    I want to make my software cleaning, so I pack all .qm file into .qrc file like this:
    myqpp.qrc
    -------------
    <rcc>
    <qresource>
    <file>translations/myapp_en.qm</file>
    <file>translations/myapp_zh.qm</file>
    </qresource>
    </rcc>

    Now in my application, when I call load translation file like below:
    QTranslator translator;
    bool bTranslator = translator.load(":/translations/myapp_zh");
    here always load failed , false returned

    could any guy give me some guide?

  2. #2
    Join Date
    May 2008
    Posts
    58
    Thanks
    2

    Default Re: Pack all .qm files into .qrc, why doesn't work???

    Anyone haven't been met this problem before?

  3. #3
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Pack all .qm files into .qrc, why doesn't work???

    have you tried to use the prefix attribute?
    like:
    <qresource prefix="/" >

    CU

  4. #4
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Pack all .qm files into .qrc, why doesn't work???

    Check is resource file is listed at the .pro file.

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.