Qt6 topics merged with General

id-based translations fails when there's enum in a QML file

  • Hi, it's me again, first of all I would like to say sorry about the previous post since I didn't correctly explain my question( I deleted it).
    My question is: I am using id-based translations in QML files, I found that if there's enum declaration in a QML file, lupdate command can't detect some translation entries in that file. By running lupdate it gives error messages like:

    error: Unexpected token `reserved word'
       enum TickPos{
    error: Expected token `:'
    EnLeft, // Enum member

    Enums are declared as:

    enum TickPos{

    lupdate can successfully detect all translation entries if I delete the enum declration. Could you please kindly advise me on this issue? Thank you very much

Log in to reply