PDA

View Full Version : QDesigner + Qtranslator + QComboBox



Atikae
9th July 2008, 18:30
Hello all.

I've a unexpected problem when I try to translate a QComboBox create with QDesigner. Instead of translate current items, he adds items translate, so at the beginning I have : One Two Three, when I translate in French, I have One Two Three Un Deux Trois.
If I want re-translate in English, I have One Two Three Un Deux Trois One Two Three.

Here my main.cpp : http://rafb.net/p/mUEjAy65.html
and method in FYN class who manage the translation : http://rafb.net/p/zSKJV039.html

Have you any idea?
Thanks.

Atikae
11th July 2008, 08:45
Bump.
No idea ?

wysota
11th July 2008, 10:45
How does your retranslation routine look like? Designer generates one for you (it's called retranslateUi()) and it should be invoked from a changeEvent, so you can override it by reimplementing changeEvent and for example clearing the contents of the box before you call retranslateUi.

The links you provided lead into 404, by the way. And that's exactly why we keep asking people to attach code instead of linking to it.

Atikae
11th July 2008, 15:41
I just add comboBox->clear(); before retranslateUi().
It's a know bug : http://trolltech.com/developer/task-tracker/index_html?method=entry&id=212077

Thanks.