If that is the case then the answer is no there is no other option
If that is the case then the answer is no there is no other option
Thanks for your reply.
In my application there is scenario where pushbutton have different text depending upon situation.
I mean to say initially push button have text(say "Hello") & after clicking them its text will be change(say "Bye"),then how to handle this .
And in re-translation of ui we set initial text of widget. If user change language after clicking button then what to do??
Yup that you can also do from this.
Check for the returned text like this ;-
Qt Code:
if(ui->pushButton->text() == "Hello") <Set the hello translation code here> else <Set the bye translation code here>To copy to clipboard, switch view to plain text mode
Write it in separate method and call it from the changeEvent().
Heavy Metal Rules. For those about to rock, we salute you.
HIT THANKS IF I HELPED.
Pardeep (8th October 2012)
Sonulohani thanks for your valuable help.
Tell me one more thing is there any why by which i can define all string used by widgets to display text, in seperate file. & At any time if user want to change string he/she can easily can change string from that file & that string reflect changes in both .ts & .qm file automatically in application & there is no need to run lupdate & irelease again??
That i think is not possible cause for translation it always load qm file. Or use QLocale instead.
Heavy Metal Rules. For those about to rock, we salute you.
HIT THANKS IF I HELPED.
Bookmarks