The bringToFront updates the widget's z-index, ensuring that the widget appears on top of all its container's widgets.
widget.bringToFront();