[Qt-interest] QTranslator / QThread

GZimmermann at t-systems.com GZimmermann at t-systems.com
Wed May 27 09:30:44 CEST 2009


Hello all,
 
I've a problem concerning using translators in threads. 
The program I've written makes extensive use of threads for background processing. The threads send status messages to the main thread via the standard signal / slot mechanisms. So far so good. The thing is, I can't get the program to actually apply the translations I've provided (via app.installTranslator). Only strings in the main thread are translated, never those generated in the worker threads. 
So: translation basically does work, but not for threads (as was to be expected, I'm sure). I couldn't find any hints in the documentation; I've tried to load a translator within the background threads and then using translator.translate() instead of tr(), but this resulted in an empty string, probably because I was to dumb to set the context correctly. 
Is there any method that should work, even for dumb people like me?
 
 
Regards
 
Gerrit
 
 
 
 
 
T-Systems Enterprise Services GmbH
Service Line Desktop Services & Solutions
Client Engineering
Gerrit Zimmermann
Quality Assurance
Salzachstrasse 4-12, 68199 Mannheim
+49 621 8456 344 (Tel)
+49 621 8456 386 (Fax)
+49 170 4546739 (Mobil)
E-Mail: gzimmermann at t-systems.com <mailto:gzimmermann at t-systems.com> 
http://www.t-systems.com <http://www.t-systems.com/> 
 
T-Systems Enterprise Services GmbH
Aufsichtsrat: René Obermann (Vorsitzender)
Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Olaf Heyden, Joachim Langmack, Dr. Matthias Schuster, Klaus Werner
Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
Sitz der Gesellschaft: Frankfurt am Main
WEEE-Reg.-Nr. DE87523644 
Notice: This transmittal and/or attachments may be privileged or confidential. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error; any review, dissemination, or copying is strictly prohibited. If you received this transmittal in error, please notify us immediately by reply and immediately delete this message and all its attachments. Thank you.

T-Systems - Business flexibility 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090527/fe13bebd/attachment.html 


More information about the Qt-interest-old mailing list