Skip to main content

CustomWidget

Project description

CustomWidget

Inicializar componente

Para inicializar este componente se hara con el siguiente constructor:
AnimatedButton(width, height) donde width es anchura y height es altura del boton.
El color de la animacion por defecto es en blanco y el texto del boton "boton".

Funciones del componente

  1. getColor()
def getColor(self):
      return self._color
  1. setColor(color)
def setColor(self, color):
      self._color = color
      self.rec.setStyleSheet("background-color:"+color)
  1. getText()
def getText(self):
      return self._text
  1. setText(text)
def setText(self, text):
      self._text = text
      self.button.setText(text)

Funcion de las funciones

Con getColor() nos devuelve un String donde te indica el color que tiene en el momento.
Con getText() nos devuelve un String donde te indica el texto que tiene en el momento.
Con setColor(texto) le pasamos un String con lo que queremos que ponga en el boton.
Con setText(texto) le pasamos un String con lo que queremos que ponga en el boton.

Pagina personal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CustomWidget-0.1.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

CustomWidget-0.1.0-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page