BalaQT
5th March 2011, 19:36
hi,
im using qt in debian. im creating a custom widget for using inside qtcreator. i want to give some language settings in my custom widget.
i tried the following ,
in plugin class, i added
myTablePlugin::myTablePlugin( QObject* parent )
: QObject(parent) {
QTranslator *translator = new QTranslator(this);
QVariant v=translator->load(":/myLang.qm");
qApp->installTranslator(translator);
}
after this, i created the .so file and copied to qt/bin/designer folder.
when i drag n drop my widget , In the user application , I can able to see the caption in local language.
but after running the application i cant able to see the language. i can see only the english captin.
pls guide me, how to set the language in plugin
pls guide me,
Bala
im using qt in debian. im creating a custom widget for using inside qtcreator. i want to give some language settings in my custom widget.
i tried the following ,
in plugin class, i added
myTablePlugin::myTablePlugin( QObject* parent )
: QObject(parent) {
QTranslator *translator = new QTranslator(this);
QVariant v=translator->load(":/myLang.qm");
qApp->installTranslator(translator);
}
after this, i created the .so file and copied to qt/bin/designer folder.
when i drag n drop my widget , In the user application , I can able to see the caption in local language.
but after running the application i cant able to see the language. i can see only the english captin.
pls guide me, how to set the language in plugin
pls guide me,
Bala