code: def __set_clear_button_visibility(self, text):
          
  
          if text:
              self.__clear_button.show()
          else:
              self.__clear_button.hide()
docs: Sets the clear button visibility.
  
          :param text: Current field text.
          :type text: QString