Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to hide a footer item(widget) on particular screen
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RG90
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • 7 Offline
      7 Offline
      77Percent
      wrote on last edited by
      #2

      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)

      1 Reply Last reply
      1
      • R Offline
        R Offline
        RG90
        wrote on last edited by
        #3

        Thanks, it helped me.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved