Results 1 to 4 of 4

Thread: QDesigner + Qtranslator + QComboBox

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QDesigner + Qtranslator + QComboBox

    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.

  2. #2
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDesigner + Qtranslator + QComboBox

    Bump.
    No idea ?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDesigner + Qtranslator + QComboBox

    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.

  4. #4
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDesigner + Qtranslator + QComboBox

    I just add comboBox->clear(); before retranslateUi().
    It's a know bug : http://trolltech.com/developer/task-...ntry&id=212077

    Thanks.

Similar Threads

  1. QDesigner classes for Arm platform
    By vjn in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 10th April 2008, 16:34
  2. Replies: 2
    Last Post: 8th February 2008, 14:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.