[SailfishDevel] How to properly hide and show UI elements?

Tomasz Sterna tomek at xiaoka.com
Fri Jul 18 15:10:53 UTC 2014


Dnia 2014-07-18, pią o godzinie 16:31 +0200, Marcin M. pisze:
> The Rectangle hides and so Button's label does. It doesn't work with
> the Button. And after enabling and disabling the effect is similar as
> previously. The button doesn't react if clicked. Seems I'll have go
> for opacity, still the question is: why are these elements still
> shown?

QML Item does not clip by default.
It allows for its children to draw outside Item boundaries. It's faster
and usually useful.

If you want an Item to clip its children, you need to set the property
clip [1] to 'true'.


[1] http://qt-project.org/doc/qt-5/qml-qtquick-item.html#clip-prop


-- 
Tomasz Sterna @ http://abadcafe.pl/ @ http://www.xiaoka.com/



More information about the Devel mailing list