[Qt-interest] qt translator
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Wed Mar 3 18:40:00 CET 2010
Well.. I would confirm that parent() is the QApplication, rarely is
it...
That said, you will need to alos make sure the LanguageChanged event is
being handled and propagated by all your classes.
Scott
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Rui Baltazar
Sent: Wednesday, March 03, 2010 09:34
To: qt-interest at trolltech.com
Subject: [Qt-interest] qt translator
i have been able to create the translation files and i am capable of
loading them at the beginning.
my problem is the following:
if i want to have a widget with settings and one of them is the
language, what should i do to load the correct translation when user
changes that setting?
i've tried something like:
QTranslator translator;
translator.load("bcg_en");
((QApplication *)parent())->installTranslator(&translator);
but the application blasts..
any ideas?
all the best
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100303/b62f9e01/attachment.html
More information about the Qt-interest-old
mailing list