def __set_clear_button_visibility(self, text):
        """
        Sets the clear button visibility.

        :param text: Current field text.
        :type text: QString
        """

        if text:
            self.__clear_button.show()
        else:
            self.__clear_button.hide()
Sets the clear button visibility.

        :param text: Current field text.
        :type text: QString