PDA

View Full Version : setDirectionLayout problems



chikkireddi
5th May 2007, 06:52
In my code I am using setLayoutDirection(Qt::RightToLeft) function. Layout changing from left to right but text is not changing properly.

Example:
Hello Qt! (In Left to right Layout)
!Hello Qt (In Right to Left Layout) instead of Hello Qt!

If text is ending with any special character like ., !,( etc..., and after changing the layout to Right to Left then text appearance is not proper.

examples:
1) Open. (LeftToRight)
.Open (RightToLeft) It should be Open.
2) Open File... (LTR)
.Open File.. (RTL)
3) Hello! (LTR)
!Hello (RTL)

If anybody knows solution to above problem, please send me a mail.

wysota
5th May 2007, 09:31
Usually if the layout direction is changed, it's because the application is asked to use a right-to-left language and that implies that a translation to that language is available and is getting loaded. So the solution is to provide and apply a translator file for the right-to-left layout.

chikkireddi
5th May 2007, 17:10
Hi,
Thank you very much for your immediate reply.

Could you please tell me, how to use translator file.. Bcoz I am new to QTopia programming...

It would be great, if your provide some examples.

Thanks and Regards
C V Rao

wysota
5th May 2007, 18:13
http://doc.trolltech.com/4.2/i18n.html