View Full Version : QT Dialog Localizing Images

10th September 2008, 19:34
Hello , I am a QT newbie. I am experimenting with QT localization support , so i am facing some problems in localizing images for a label .

I created a QDialog with a label in it . I am creating the label using the following code

label = new QLabel(Dialog);
label->setGeometry(QRect(150, 60, 151, 131));

The QRC file referenced above is like this

<qresource prefix="newPrefix" lang="en" >
<qresource prefix="newPrefix" lang="fi" >
<file>pic2 .jpg</file>
<qresource prefix="newPrefix" lang="de" >
<file>pic2 .jpg</file>

I created pro ( added RESOURCES += test.qrc also ) , makefiles and run mingw32-make to generate the binaries . When i run the program in default locale( en) it is displaying the Label with Image .

But if i changed the Locale to DE or FI and run the app , the image is not displaying in the label . Ideally if i choose DE , pic2.jpg should display as per the QRC contract ?

Any idea what is the problem , am i missing anything ?

can some one help

12th September 2008, 18:53
Do you call


after changing the locale?