I have a Page has name myPage in PageStack and define a qml function that allow other qml Item can change its property. I want to change visible and hide its toolbar. (controlsTools is child of this page).
@ function setVisible(value)
{
visible = value;
tools = (visible) ? myTools : null;
}
@
But when I call this with FALSE, only page is invisible but tools is still there and also can click in the toolbar.
When in this page, I push another page to pagestack, after that I pop() and come back to myPage, if its visible is false, toolbar gone, other if visible is true, toolbar's still there. That's the only way now I can hide myTools:

  1. push new Page.
  2. Set visible to false (do not need if already set before).
  3. pop() to comeback to myPage.

And if myTools is hide, I cannot take it back with this function.

So I call "refresh" because I guess it doesn't refresh the tools UI although the myTools is set to null.