← Back to team overview

touch-packages team mailing list archive

[Bug 1515635] Re: head.visible does not work if binded to other property

 

Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: ubuntu-ui-toolkit (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1515635

Title:
  head.visible does not work if binded to other property

Status in ubuntu-ui-toolkit package in Ubuntu:
  Confirmed

Bug description:
  Changing visibility of a page header does not seem to work if
  head.visible is binded to another property and that property changes.

  This code works (visibility changes on button click):

  import QtQuick 2.4
  import Ubuntu.Components 1.3

  Page {
      id: root

      title: "Test page"

      head.visible: true

      Button {
          anchors.centerIn: parent
          onClicked: {
              if (root.head.visible) {
                  root.head.visible = false
              }
              else {
                  root.head.visible = true
              }
          }
      }
  }

  This one doesn't work:

  import QtQuick 2.4
  import Ubuntu.Components 1.3

  Page {
      id: root

      property bool isHeaderVisible: true

      title: "Test page"

      head.visible: isHeaderVisible

      Button {
          anchors.centerIn: parent
          onClicked: {
              if (root.isHeaderVisible) {
                  root.isHeaderVisible = false
              }
              else {
                  root.isHeaderVisible = true
              }
          }
      }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1515635/+subscriptions


References