Problem with Transition in QML



  • Hi everybody,

    I'm experiencing an issue with a Transition in a Column I use to change the language of my app. I touch the flag of the default language to spread out all the languages so that I can chose the language. Everything works but when I want to do it again I can't spread out the flags.

    Here's the code :

    import QtQuick 2.4
    
    Column {
        id: languageMenu
    
        property int defaultHeight: 64
        property int defaultWidth:  64
        property string currentLanguage: translation.currentLanguage
        property bool sendMessage: false
    
        Icon {
            id:languageFr
            iconImgWidth:defaultWidth
            iconImgHeight:defaultHeight
            border.width: 0
            label: constants.APPLI_NO_DATA
            iconImgSource: constants.APPLI_LANG_FRANCAISE_IMGSRC
            iconBorderImgSource: constants.APPLI_NO_IMGSRC
            iconStateImgSource: constants.APPLI_NO_IMGSRC
            visible: translation.frVisible
            execFunction: (function()
            {
                translation.selectLanguage("FRA");
                map.setMapLoLhd(true);
            })
        }
    
        Icon {
            id:languageEn
            iconImgWidth:defaultWidth
            iconImgHeight:defaultHeight
            border.width: 0
            label: constants.APPLI_NO_DATA
            iconImgSource: constants.APPLI_LANG_ANGLAISE_IMGSRC
            iconBorderImgSource:constants.APPLI_NO_IMGSRC
            iconStateImgSource: constants.APPLI_NO_IMGSRC
            visible: translation.enVisible
            execFunction: (function()
            {
                translation.selectLanguage("ENU");
                map.setMapLoLhd(true);
            })
        }
    
        Icon {
            id:languageAr
            iconImgWidth:defaultWidth
            iconImgHeight:defaultHeight
            border.width: 0
            label: constants.APPLI_NO_DATA
            iconImgSource: constants.APPLI_LANG_ARABE_IMGSRC
            iconBorderImgSource: constants.APPLI_NO_IMGSRC
            iconStateImgSource: constants.APPLI_NO_IMGSRC
            visible: translation.arVisible
            execFunction: (function()
            {
                translation.selectLanguage("ARB");
                //map.setMapLoLhd(false);
            })
        }
    
        Icon {
            id:languageEsp
            iconImgWidth:defaultWidth
            iconImgHeight:defaultHeight
            border.width: 0
            label: constants.APPLI_NO_DATA
            iconImgSource: constants.APPLI_LANG_ESPAGNOLE_IMGSRC
            iconBorderImgSource: constants.APPLI_NO_IMGSRC
            iconStateImgSource: constants.APPLI_NO_IMGSRC
            visible: translation.espVisible
            execFunction: (function()
            {
                translation.selectLanguage("ESP");
                map.setMapLoLhd(true);
            })
        }
    
        move: Transition {
            NumberAnimation { properties: "x,y"; duration: 200 }
        }
    }
    

    Anyone would have an idea ?

    Regards,


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.