If you're developing targeting ubuntu-sdk-14.10 as toolkit, you could use the workaround in the page definition:
property Item __oldContents: null Connections { target: page.head onContentsChanged: { if (page.__oldContents) { page.__oldContents.parent = null; } page.__oldContents = page.head.contents; } } see also the attached file. ** Attachment added: "test.qml" https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1400297/+attachment/4293091/+files/test.qml -- 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/1400297 Title: PageHeadState doens't correctly update head.contents Status in ubuntu-ui-toolkit package in Ubuntu: Fix Committed Bug description: See this small example code: http://paste.ubuntu.com/9426167/ As you can see, I set both PageHeadState to change their 'contents' property when changing state. The expected behavior would be to have in the page head a Label when state is "default" and a TextEntry when in "search" state. However after some interactions (switching state 2 times) both the Label and the Entry are shown. As this doesn't happen with other properties, this should not happen with contents. I can set a 'visible' property to each component as workaround though. Thanks, Giulio To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1400297/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp