How to hide a footer item(widget) on particular screen



  • Hi,

    I am working on footer item in QML. I have a common QML file for both phone book and saved contacts (cpp). I have create a footer item in QML, but I just want to see it on saved contacts screen but it is also showing on phone book screen which I don't want. So, can any one help me how can we hide or don't appear. Is there is any conditional statement method to use in QML. if so can you explain me.



  • Hi.
    If you really want to use common footer,you may to change its visible/height property just like following:
    footer:Rectangle{
    visible: yourStackWhichHoldsDescribedPages.currentIndex == 0 ? true : false
    //or
    height: yourStackWhichHoldsDescribedPages.currentIndex == 0 ? 0 : 25
    }
    OR:
    just make your custom footer in your 'saved contacts' page,not in parent object. (this way is better IMO)



  • Thanks, it helped me.


Log in to reply