Created
October 20, 2015 16:14
-
-
Save jalfonsosuarez/23273751501855099382 to your computer and use it in GitHub Desktop.
curso de PyQt5 con Python 3.4 de Manuel J. Dávila
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CursoPyQt_Linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="jdk" jdkName="Python 3.4.3 (C:\Python34\python.exe)" jdkType="Python SDK" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
</module> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
<OptionsSetting value="true" id="Add" /> | |
<OptionsSetting value="true" id="Remove" /> | |
<OptionsSetting value="true" id="Checkout" /> | |
<OptionsSetting value="true" id="Update" /> | |
<OptionsSetting value="true" id="Status" /> | |
<OptionsSetting value="true" id="Edit" /> | |
<ConfirmationsSetting value="0" id="Add" /> | |
<ConfirmationsSetting value="0" id="Remove" /> | |
</component> | |
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.3 (C:\Python34\python.exe)" project-jdk-type="Python SDK" /> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectModuleManager"> | |
<modules> | |
<module fileurl="file://$PROJECT_DIR$/.idea/CursoPyQt_Linux.iml" filepath="$PROJECT_DIR$/.idea/CursoPyQt_Linux.iml" /> | |
</modules> | |
</component> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="VcsDirectoryMappings"> | |
<mapping directory="" vcs="" /> | |
</component> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys | |
from PyQt5.QtWidgets import QApplication, QMainWindow, QDialog, QPushButton, QLabel | |
from PyQt5 import uic | |
class dlgPrueba(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
self.resize(300,300) | |
self.setWindowTitle("Dialog de prueba") | |
self.etiqueta=QLabel(self) | |
uic.loadUi("vistas/dlgStyle.ui",self) | |
class Ventana(QMainWindow): | |
def __init__(self): | |
QMainWindow.__init__(self) | |
self.resize(600,600) | |
self.setWindowTitle("Ventana principal") | |
self.boton=QPushButton(self) | |
self.boton.setText("Abrir cuadro de dialogo") | |
self.boton.resize(200,30) | |
self.dialogo=dlgPrueba() | |
self.boton.clicked.connect(self.abrirDlg) | |
def abrirDlg(self): | |
self.dialogo.etiqueta.setText("Dialogo abierto desde ventana principal") | |
self.dialogo.exec_() | |
app=QApplication(sys.argv) | |
ventana=Ventana() | |
ventana.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys | |
from PyQt5.QtWidgets import QApplication, QDialog | |
from PyQt5 import uic | |
from PyQt5.QtCore import QUrl, QFileInfo, QFile, QIODevice | |
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest | |
class DlgProgressBar(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
uic.loadUi("vistas/progressBar.ui", self) | |
#Almacena la url del archivo a descargar | |
self.url = None | |
#Almacena el manejador del fichero a crear | |
self.file = None | |
#almacena el nombre del archivo a descargar | |
self.filename = None | |
#almacena en su caso el error en un string | |
self.errorString = None | |
#almacena en su caso el número de error | |
self.errorCode = None | |
#Objeto para establecer la conexión y crear el objeto QNetworkReply | |
self.http = QNetworkAccessManager(self) | |
#Desactivar los botones de descargar y cancelar en un principio | |
self.btDescargar.setEnabled(False) | |
self.btCancelar.setEnabled(False) | |
#Establece si los botones están activos o no | |
self.btn_active = False | |
#Inicia el proceso de descarga | |
self.btDescargar.clicked.connect(self.download) | |
#Cancela la descarga | |
self.btCancelar.clicked.connect(self.cancel_download) | |
#Detectar el cambio de texto en el campo de texto para activar el botón de descarga | |
self.edRuta.textChanged.connect(self.btn_enabled) | |
#Detectar el cambio de texto en el campo de texto para activar el botón de descarga | |
def btn_enabled(self): | |
if self.edRuta.text() != "": | |
self.btn_active = True | |
self.btDescargar.setEnabled(True) | |
else: | |
self.btn_active = False | |
#Inicia todo el proceso de descarga | |
def download(self): | |
if self.btn_active == True: | |
#edRuta indicada por el usuario | |
edRuta = self.edRuta.text() | |
self.url = QUrl(edRuta) | |
fileinfo = QFileInfo(self.url.path()) | |
self.filename = fileinfo.fileName() | |
#Manejador del fichero | |
self.file = QFile(self.filename) | |
#Si no es posible crear el fichero | |
if not self.file.open(QIODevice.WriteOnly): | |
self.lblEstado.setText("No se pudo crear el archivo") | |
self.file.close() | |
else: #Entonces llamar al método que inicia la descarga del archivo | |
self.start_download() | |
#Inicia el proceso de descarga y controla las diferente señales (eventos) durante la misma | |
def start_download(self): | |
#Objeto QNetworkReply | |
self.reply = self.http.get(QNetworkRequest(self.url)) | |
self.lblEstado.setText("Iniciando la descarga ...") | |
#Empieza la lectura del archivo remoto y escritura local | |
self.reply.readyRead.connect(self.ready_read) | |
#Señal predefinida para obtener los bytes en el proceso descarga y asignarlos al progressBar | |
self.reply.downloadProgress.connect(self.updateDataReadProgress) | |
#Señal para capturar posibles errores durante la descarga | |
self.reply.error.connect(self.error_download) | |
#Finalización de la descarga | |
self.reply.finished.connect(self.finished_download) | |
#Ocurre durante la escritura del archivo | |
def ready_read(self): | |
#Escritura del archivo local | |
self.file.write(self.reply.readAll()) | |
self.lblEstado.setText("Descargando ...") | |
#Activación del botón de cancelar | |
self.btCancelar.setEnabled(True) | |
#Método predefinido en la clase QNetworkReply para leer el progreso de descarga | |
def updateDataReadProgress(self, bytesRead, totalBytes): | |
self.progressBar.setMaximum(totalBytes) | |
self.progressBar.setValue(bytesRead) | |
#Si ha ocurrido algún error durante el proceso de descarga | |
def error_download(self, error): | |
#Si ha ocurrido un error, mostrar el error e eliminar el archivo en el método finished_download | |
self.errorString = self.reply.errorString() | |
self.errorCode = error | |
#Ocurre cuando la descarga ha finalizado | |
def finished_download(self): | |
#Si existe un error | |
if self.errorCode is not None: | |
#Poner a 0 el progressBar | |
self.progressBar.setValue(0) | |
self.lblEstado.setText(str(self.errorCode) + ": " + self.errorString) | |
#Eliminar el archivo | |
self.file.remove() | |
else: | |
self.lblEstado.setText("Descarga completada") | |
#Cerrar el fichero | |
self.file.close() | |
#Desactivar el botón de cancelar ya que la descarga ha finalizado | |
self.btCancelar.setEnabled(False) | |
#Restaurar a None los valores de los atributos de error | |
self.errorString = None | |
self.errorCode = None | |
#Cancelar la descargar durante su ejecución | |
def cancel_download(self): | |
#Abortar la descarga | |
self.reply.abort() | |
#Desconectar del servidor | |
self.reply.close() | |
#Eliminar el fichero | |
self.file.remove() | |
#Cerrar el fichero | |
self.file.close() | |
app = QApplication(sys.argv) | |
dlgProgressBar = DlgProgressBar() | |
dlgProgressBar.show() | |
app.exec_() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys | |
from PyQt5.QtWidgets import QApplication, QMainWindow, QDialog, QPushButton, QLabel | |
from PyQt5 import uic | |
class dlgPrueba(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
self.resize(300,300) | |
self.setWindowTitle("Dialog de prueba") | |
self.etiqueta=QLabel(self) | |
class Ventana(QMainWindow): | |
def __init__(self): | |
QMainWindow.__init__(self) | |
self.resize(600,600) | |
self.setWindowTitle("Ventana principal") | |
self.boton=QPushButton(self) | |
self.boton.setText("Abrir cuadro de dialogo") | |
self.boton.resize(200,30) | |
self.dialogo=dlgPrueba() | |
self.boton.clicked.connect(self.abrirDlg) | |
def abrirDlg(self): | |
self.dialogo.etiqueta.setText("Dialogo abierto desde ventana principal") | |
self.dialogo.exec_() | |
app=QApplication(sys.argv) | |
ventana=Ventana() | |
ventana.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys, re | |
from PyQt5.QtWidgets import QApplication, QDialog | |
from PyQt5 import uic | |
class DlgComboBox(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
uic.loadUi("vistas/comboBox.ui",self) | |
self.btEnviar.clicked.connect(self.getItem) | |
#Agregar un item al combobox | |
self.cbxLenguaje.addItem("C++") | |
#Eliminar un elemento por el index (empieza en 0) | |
self.cbxLenguaje.removeItem(0) | |
def getItem(self): | |
item = self.cbxLenguaje.currentText() | |
self.lblLenguaje.setText("Has seleccionado: " + item) | |
app=QApplication(sys.argv) | |
dlgComboBox=DlgComboBox() | |
dlgComboBox.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys, re | |
from PyQt5.QtWidgets import QApplication, QDialog | |
from PyQt5 import uic | |
class DlgListWidget(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
uic.loadUi("vistas/listWidget.ui",self) | |
self.btEnviar.clicked.connect(self.getItems) | |
#Agregar nuevos items | |
self.lstLenguajes.addItem("Visual basic") | |
#Eliminar un item | |
self.deleteItem("Python") | |
def deleteItem(self,nombre): | |
#Array para almacenar cada item objeto | |
items=[] | |
#Recorrer item a item | |
for x in range(self.lstLenguajes.count()): | |
item=self.lstLenguajes.item(x) | |
items.append(item) | |
#Nuevo array para almacenar el nombre de cada item | |
nombres=[i.text() for i in items] | |
#Recorrer el array nombres | |
for x in range(len(nombres)): | |
#Si existe el nombre | |
if nombres[x]==nombre: | |
#Eliminar | |
item=self.lstLenguajes.indexFromItem(self.lstLenguajes.item(x)) | |
self.lstLenguajes.model().removeRow(item.row()) | |
def getItems(self): | |
items = self.lstLenguajes.selectedItems() | |
#Array para guardar los items seleccionados | |
selected=[] | |
for x in range(len(items)): | |
selected.append(self.lstLenguajes.selectedItems()[x].text()) | |
self.lblLenguaje.setText("Seleccionados: " + "-".join(selected)) | |
app=QApplication(sys.argv) | |
dlgListWidget=DlgListWidget() | |
dlgListWidget.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys | |
from PyQt5.QtWidgets import QApplication, QDialog | |
from PyQt5 import uic | |
class DlgSlider(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
uic.loadUi("vistas/slider.ui",self) | |
#Horizontal slider | |
self.horizontalSlider.setMinimum(0) | |
self.horizontalSlider.setMaximum(100) | |
self.horizontalSlider.setSingleStep(1) | |
self.horizontalSlider.setValue(50) | |
self.horizontalSlider.valueChanged.connect(self.getValueHorizontal) | |
self.verticalSlider.setMinimum(0) | |
self.verticalSlider.setMaximum(1000) | |
self.verticalSlider.setSingleStep(10) | |
self.verticalSlider.setValue(500) | |
self.verticalSlider.valueChanged.connect(self.getValueVertical) | |
def getValueHorizontal(self): | |
value=self.horizontalSlider.value() | |
self.lblHorizontal.setText(str(value)) | |
def getValueVertical(self): | |
value=self.verticalSlider.value() | |
self.lblVertical.setText(str(value)) | |
app=QApplication(sys.argv) | |
dlgSlider=DlgSlider() | |
dlgSlider.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys, time | |
from PyQt5.QtWidgets import QApplication, QDialog, QTreeWidgetItem | |
from PyQt5 import uic | |
from os import listdir, path, stat | |
from mimetypes import MimeTypes | |
class DlgTreeWidget(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
uic.loadUi("vistas/treeWidget.ui",self) | |
self.btBuscar.clicked.connect(self.getDir) | |
self.treeDirectorio.itemDoubleClicked.connect(self.openElement) | |
def getDir(self): | |
#Eliminar todas las filas de la busqueda anterior | |
self.treeDirectorio.clear() | |
#Ruta indicada por el usuario | |
dir=self.edRuta.text() | |
#Comprobar si es un directorio | |
if path.isdir(dir): | |
#Recorrer sus elementos | |
for element in listdir(dir): | |
nombre=element | |
ruta=dir+"/"+nombre | |
datos=stat(ruta) | |
#Si es un directorio | |
if path.isdir(ruta): | |
tipo="Carpeta de archivos" | |
tamano="" | |
else: | |
mime=MimeTypes() | |
tipo=mime.guess_type(ruta)[0] | |
tamano=str(datos.st_size) + " bytes" | |
#Fecha modificacion archivo o carpeta | |
fecha = str(time.ctime(datos.st_mtime)) | |
#Crear un array para las filas con todos los items | |
fila=[nombre,fecha,tipo,tamano] | |
#Insertar la fila | |
self.treeDirectorio.insertTopLevelItems(0,[QTreeWidgetItem(self.treeDirectorio, fila)]) | |
def openElement(self): | |
#Obtener el item seleccionado | |
item=self.treeDirectorio.currentItem() | |
#Crear la ruta accediendo al nomnre del elemento (carpeta o archivo) | |
elemento=self.edRuta.text()+"/"+item.text(0) | |
#Si es un directorio, navegar a su contenido | |
if path.isdir(elemento): | |
self.edRuta.setText(elemento) | |
self.getDir() | |
else: | |
#Si es un arvhivo intentar abrirlo con el programa por defecto | |
#Este código es para windows, buscar para Linux | |
#starfile(elemento) | |
return None | |
app=QApplication(sys.argv) | |
dlgTreeWidget=DlgTreeWidget() | |
dlgTreeWidget.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys, re | |
from PyQt5.QtWidgets import QApplication, QDialog, QMessageBox | |
from PyQt5 import uic | |
class DlgValidar(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
uic.loadUi("vistas/dlgValidacion.ui",self) | |
self.edNombre.textChanged.connect(self.validar_nombre) | |
self.edEmail.textChanged.connect(self.validar_email) | |
self.btnValidar.clicked.connect(self.validar_formulario) | |
def validar_nombre(self): | |
nombre=self.edNombre.text() | |
validar=re.match('^[a-z\sáéíóúàèìòùäëïöüñ]+$',nombre,re.I) | |
if nombre=="": | |
self.edNombre.setStyleSheet("border: 1px solid yellow;") | |
return False | |
elif not validar: | |
self.edNombre.setStyleSheet("border: 1px solid red;") | |
return False | |
else: | |
self.edNombre.setStyleSheet("border: 1px solid green;") | |
return True | |
def validar_email(self): | |
email=self.edEmail.text() | |
validar=re.match('^[a-zA-Z0-9\._-]+@[a-zA-Z0-9-]{2,}[.][a-zA-Z]{2,4}$',email,re.I) | |
if email=="": | |
self.edEmail.setStyleSheet("border: 1px solid yellow;") | |
return False | |
elif not validar: | |
self.edEmail.setStyleSheet("border: 1px solid red;") | |
return False | |
else: | |
self.edEmail.setStyleSheet("border: 1px solid green;") | |
return True | |
def validar_formulario(self): | |
if self.validar_nombre() and self.validar_email(): | |
QMessageBox.information(self,"Formulario correcto", "Validacion correcta", QMessageBox.Discard) | |
else: | |
QMessageBox.warning(self,"Formularion incorrecto", "Validación incorrecta", QMessageBox.Discard) | |
app=QApplication(sys.argv) | |
dlgValidar=DlgValidar() | |
dlgValidar.show() | |
app.exec_() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys | |
from PyQt5.QtWidgets import QApplication, QDialog, QGridLayout, QMessageBox, QLabel, QPushButton, QLineEdit, QSpinBox | |
from PyQt5.QtSql import QSqlDatabase, QSqlQuery | |
class Dialogo(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
self.setWindowTitle("Insertar datos") #Título | |
self.resize(300, 300) #Tamaño inicial | |
self.setMinimumSize(300, 300) #Tamaño mínimo | |
self.setMaximumSize(300, 300) #Tamaño máximo | |
self.layout = QGridLayout() #Crear un layout grid | |
self.setLayout(self.layout) #Agregar el layout al cuadro de diálogo | |
self.label_nombre = QLabel("Nombre:") #Etiqueta nombre | |
self.txt_nombre = QLineEdit() #Campo para ingresar el nombre | |
self.label_edad = QLabel("Edad:") #Etiqueta edad | |
self.txt_edad = QSpinBox() #Campo para ingresar la edad | |
#Botones | |
self.btn_insertar = QPushButton("Insertar") | |
self.btn_cancelar = QPushButton("Cancelar") | |
#Agregar elementos al layout divido en dos columnas | |
self.layout.addWidget(self.label_nombre, 1, 1) | |
self.layout.addWidget(self.txt_nombre, 1, 2) | |
self.layout.addWidget(self.label_edad, 2, 1) | |
self.layout.addWidget(self.txt_edad, 2, 2) | |
self.layoutButton = QGridLayout() #Layout para agrupar los botones | |
#Agregar los botones al layoutButton | |
self.layoutButton.addWidget(self.btn_insertar, 1, 1) | |
self.layoutButton.addWidget(self.btn_cancelar, 1, 2) | |
#Agregar el layoutButton en la fila 3 columna 2 | |
self.layout.addLayout(self.layoutButton, 3, 2) | |
#Establecer conexión a la base de datos MySql | |
self.db = QSqlDatabase.addDatabase('QMYSQL') | |
self.db.setHostName("localhost") | |
self.db.setDatabaseName("usuarios") | |
self.db.setUserName("root") | |
self.db.setPassword("dss") | |
self.btn_insertar.clicked.connect(self.Insertar) | |
self.btn_cancelar.clicked.connect(self.Cancelar) | |
def Insertar(self): | |
estado = self.db.open() | |
if estado == False: | |
QMessageBox.warning(self, "Error", self.db.lastError().text(), QMessageBox.Discard) | |
else: | |
nombre = self.txt_nombre.text() | |
edad = self.txt_edad.text() | |
sql = "INSERT INTO usuarios(nombre, edad) VALUES (:nombre, :edad)" | |
consulta = QSqlQuery() | |
consulta.prepare(sql) | |
consulta.bindValue(":nombre", nombre) | |
consulta.bindValue(":edad", edad) | |
estado = consulta.exec_() | |
if estado == True: | |
QMessageBox.information(self, "Correcto", "Datos guardados", QMessageBox.Discard) | |
else: | |
QMessageBox.warning(self, "Error", self.db.lastError().text(), QMessageBox.Discard) | |
self.db.close() | |
def Cancelar(self): | |
self.close() | |
app = QApplication(sys.argv) | |
dialogo = Dialogo() | |
dialogo.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys, re | |
from PyQt5.QtWidgets import QApplication, QDialog | |
from PyQt5 import uic | |
class DlgRadioCheckBox(QDialog): | |
def __init__(self): | |
QDialog.__init__(self) | |
uic.loadUi("vistas/radio_checkbox.ui",self) | |
self.radio_value() | |
self.btAceptar.clicked.connect(self.radio_value) | |
self.checkBox_state() | |
self.btAceptar.clicked.connect(self.checkBox_state) | |
def radio_value(self): | |
if self.rbPython.isChecked(): | |
self.lblLenguaje.setText("Ha seleccionado Python") | |
elif self.rbPhp.isChecked(): | |
self.lblLenguaje.setText("Ha seleccionado PHP") | |
elif self.rbPerl.isChecked(): | |
self.lblLenguaje.setText("Ha seleccionado Perl") | |
elif self.rbRuby.isChecked(): | |
self.lblLenguaje.setText("Ha seleccionado Ruby") | |
else: | |
self.lblLenguaje.setText("No ha seleccionado lenguaje") | |
def checkBox_state(self): | |
if self.cbAceptarTerminos.isChecked(): | |
self.lblTerminos.setText("Términos aceptados") | |
else: | |
self.lblTerminos.setText("Términos no aceptados") | |
app=QApplication(sys.argv) | |
dlgRadioCheckBox=DlgRadioCheckBox() | |
dlgRadioCheckBox.show() | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' | |
import sys | |
from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox | |
from PyQt5 import uic | |
from PyQt5.QtGui import QFont | |
from PyQt5.QtCore import Qt | |
#Clase heredada de QMainWindow | |
class Ventana(QMainWindow): | |
#Constructor de la clase | |
def __init__(self): | |
#Inicia el objeto QMainWindow | |
QMainWindow.__init__(self) | |
#Cargar la configuracion del archivo .ui en el objeto | |
uic.loadUi("vistas/ventanaPrincipal.ui", self) | |
#Cambiar titulo de la ventana | |
self.setWindowTitle("Título de la ventana") | |
#Mostrar ventana maximizada | |
# self.showMaximized() | |
#Fijer el tamaño de la ventana | |
#Fijar el tamaño mínimo | |
self.setMinimumSize(500,500) | |
#Fijar el tamaño máximo | |
self.setMaximumSize(500,500) | |
#Mover la ventana y centrarla en el escritorio | |
resolucion = QApplication.desktop() | |
resolucion_ancho = resolucion.width() | |
resolucion_alto = resolucion.height() | |
left = (resolucion_ancho-self.frameSize().width())/2 | |
top = (resolucion_alto-self.frameSize().height())/2 | |
self.move(left,top) | |
#Desactivar la ventana | |
#self.setEnabled(False) | |
#Asignar un tipo de fuente | |
qfont=QFont("Arial",12,QFont.Bold) | |
self.setFont(qfont) | |
#Asignar un tipo de cursor | |
self.setCursor(Qt.SizeAllCursor) | |
#Asignar estilo CSS | |
#self.setStyleSheet("background-color: #000; color: #fff;") | |
#Cambiando el estilo al botón. | |
self.btnBoton.setStyleSheet("background-color: #000; color: #fff; font-size: 10px;") | |
def showEvent(self,event): | |
self.lblBienvenido.setText("¡¡¡BIENVENIDOOOOO!!!") | |
def closeEvent(self,event): | |
resultado=QMessageBox.question(self,"Salir...","¿Desea salir?", QMessageBox.Yes | QMessageBox.No) | |
if resultado == QMessageBox.Yes: | |
event.accept() | |
else: | |
event.ignore() | |
def moveEvent(self,event): | |
x=str(event.pos().x()) | |
y=str(event.pos().y()) | |
self.lblPosicion.setText("x: "+ x + " y: " + y ) | |
#Instancia para iniciar una aplicacion | |
app = QApplication(sys.argv) | |
#Crear objeto de la clase Ventana | |
_ventana = Ventana() | |
#Mostrar la ventana | |
_ventana.show() | |
#Ejecutar la aplicación | |
app.exec_() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'alfonso' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>400</width> | |
<height>300</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<widget class="QComboBox" name="cbxLenguaje"> | |
<property name="geometry"> | |
<rect> | |
<x>100</x> | |
<y>60</y> | |
<width>201</width> | |
<height>27</height> | |
</rect> | |
</property> | |
<item> | |
<property name="text"> | |
<string>Python</string> | |
</property> | |
</item> | |
<item> | |
<property name="text"> | |
<string>PHP</string> | |
</property> | |
</item> | |
<item> | |
<property name="text"> | |
<string>Perl</string> | |
</property> | |
</item> | |
<item> | |
<property name="text"> | |
<string>Ruby</string> | |
</property> | |
</item> | |
</widget> | |
<widget class="QLabel" name="lblLenguaje"> | |
<property name="geometry"> | |
<rect> | |
<x>30</x> | |
<y>150</y> | |
<width>341</width> | |
<height>17</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string/> | |
</property> | |
</widget> | |
<widget class="QPushButton" name="btEnviar"> | |
<property name="geometry"> | |
<rect> | |
<x>250</x> | |
<y>110</y> | |
<width>98</width> | |
<height>27</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Enviar</string> | |
</property> | |
</widget> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>492</width> | |
<height>262</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<property name="styleSheet"> | |
<string notr="true">QDialog{ | |
background-color:green; | |
font-famili:arial,verdana; | |
} | |
QLineEdit{ | |
border:0; | |
font-size:14px; | |
height:30px; | |
} | |
QLabel{ | |
color:white; | |
font-size:14px; | |
} | |
QPushButton#btnBoton{ | |
background-color:#000; | |
color: #fff; | |
font-size:16px; | |
border:0; | |
} | |
QPushButton#btnBoton:hover{ | |
background-color:orange; | |
}</string> | |
</property> | |
<widget class="QPushButton" name="btnBoton"> | |
<property name="geometry"> | |
<rect> | |
<x>310</x> | |
<y>190</y> | |
<width>111</width> | |
<height>41</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Enviar</string> | |
</property> | |
</widget> | |
<widget class="QWidget" name=""> | |
<property name="geometry"> | |
<rect> | |
<x>80</x> | |
<y>20</y> | |
<width>351</width> | |
<height>151</height> | |
</rect> | |
</property> | |
<layout class="QGridLayout" name="gridLayout"> | |
<item row="0" column="0"> | |
<widget class="QLabel" name="label"> | |
<property name="text"> | |
<string>Campo1</string> | |
</property> | |
</widget> | |
</item> | |
<item row="0" column="1"> | |
<widget class="QLineEdit" name="lineEdit"> | |
<property name="text"> | |
<string/> | |
</property> | |
</widget> | |
</item> | |
<item row="1" column="0"> | |
<widget class="QLabel" name="label_2"> | |
<property name="text"> | |
<string>Campo2</string> | |
</property> | |
</widget> | |
</item> | |
<item row="1" column="1"> | |
<widget class="QLineEdit" name="lineEdit_2"/> | |
</item> | |
<item row="2" column="0"> | |
<widget class="QLabel" name="label_3"> | |
<property name="text"> | |
<string>Campo3</string> | |
</property> | |
</widget> | |
</item> | |
<item row="2" column="1"> | |
<widget class="QLineEdit" name="lineEdit_3"/> | |
</item> | |
</layout> | |
</widget> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>400</width> | |
<height>266</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<widget class="QPushButton" name="btnValidar"> | |
<property name="geometry"> | |
<rect> | |
<x>250</x> | |
<y>210</y> | |
<width>98</width> | |
<height>27</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Validar</string> | |
</property> | |
</widget> | |
<widget class="QWidget" name=""> | |
<property name="geometry"> | |
<rect> | |
<x>70</x> | |
<y>20</y> | |
<width>281</width> | |
<height>161</height> | |
</rect> | |
</property> | |
<layout class="QGridLayout" name="gridLayout"> | |
<item row="2" column="1"> | |
<widget class="QSpinBox" name="spnEdad"/> | |
</item> | |
<item row="1" column="0"> | |
<widget class="QLabel" name="lblEmail"> | |
<property name="text"> | |
<string>Email:</string> | |
</property> | |
</widget> | |
</item> | |
<item row="2" column="0"> | |
<widget class="QLabel" name="lblEdad"> | |
<property name="text"> | |
<string>Edad</string> | |
</property> | |
</widget> | |
</item> | |
<item row="0" column="1"> | |
<widget class="QLineEdit" name="edNombre"/> | |
</item> | |
<item row="1" column="1"> | |
<widget class="QLineEdit" name="edEmail"/> | |
</item> | |
<item row="0" column="0"> | |
<widget class="QLabel" name="lblNOmbre"> | |
<property name="text"> | |
<string>Nombre:</string> | |
</property> | |
</widget> | |
</item> | |
</layout> | |
</widget> | |
<zorder>edNombre</zorder> | |
<zorder>lblNOmbre</zorder> | |
<zorder>edEmail</zorder> | |
<zorder>lblEmail</zorder> | |
<zorder>spnEdad</zorder> | |
<zorder>lblEdad</zorder> | |
<zorder>spnEdad</zorder> | |
<zorder>btnValidar</zorder> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>646</width> | |
<height>426</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<widget class="QListWidget" name="lstLenguajes"> | |
<property name="geometry"> | |
<rect> | |
<x>40</x> | |
<y>20</y> | |
<width>561</width> | |
<height>201</height> | |
</rect> | |
</property> | |
<property name="selectionMode"> | |
<enum>QAbstractItemView::MultiSelection</enum> | |
</property> | |
<property name="currentRow"> | |
<number>0</number> | |
</property> | |
<item> | |
<property name="text"> | |
<string>Python</string> | |
</property> | |
</item> | |
<item> | |
<property name="text"> | |
<string>PHP</string> | |
</property> | |
</item> | |
<item> | |
<property name="text"> | |
<string>Perl</string> | |
</property> | |
</item> | |
<item> | |
<property name="text"> | |
<string>Ruby</string> | |
</property> | |
</item> | |
</widget> | |
<widget class="QPushButton" name="btEnviar"> | |
<property name="geometry"> | |
<rect> | |
<x>500</x> | |
<y>250</y> | |
<width>98</width> | |
<height>27</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Enviar</string> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblLenguaje"> | |
<property name="geometry"> | |
<rect> | |
<x>40</x> | |
<y>250</y> | |
<width>431</width> | |
<height>31</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string/> | |
</property> | |
</widget> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>569</width> | |
<height>300</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<widget class="QLabel" name="lblRuta"> | |
<property name="geometry"> | |
<rect> | |
<x>20</x> | |
<y>30</y> | |
<width>41</width> | |
<height>17</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Ruta:</string> | |
</property> | |
</widget> | |
<widget class="QLineEdit" name="edRuta"> | |
<property name="geometry"> | |
<rect> | |
<x>60</x> | |
<y>30</y> | |
<width>491</width> | |
<height>27</height> | |
</rect> | |
</property> | |
</widget> | |
<widget class="QProgressBar" name="progressBar"> | |
<property name="geometry"> | |
<rect> | |
<x>70</x> | |
<y>110</y> | |
<width>451</width> | |
<height>23</height> | |
</rect> | |
</property> | |
<property name="value"> | |
<number>0</number> | |
</property> | |
</widget> | |
<widget class="QPushButton" name="btDescargar"> | |
<property name="geometry"> | |
<rect> | |
<x>190</x> | |
<y>170</y> | |
<width>98</width> | |
<height>27</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Descargar</string> | |
</property> | |
</widget> | |
<widget class="QPushButton" name="btCancelar"> | |
<property name="geometry"> | |
<rect> | |
<x>290</x> | |
<y>170</y> | |
<width>98</width> | |
<height>27</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Cancelar</string> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblEstado"> | |
<property name="geometry"> | |
<rect> | |
<x>250</x> | |
<y>70</y> | |
<width>66</width> | |
<height>17</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string/> | |
</property> | |
</widget> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>400</width> | |
<height>300</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<widget class="QGroupBox" name="rbRuby"> | |
<property name="geometry"> | |
<rect> | |
<x>70</x> | |
<y>40</y> | |
<width>231</width> | |
<height>91</height> | |
</rect> | |
</property> | |
<property name="title"> | |
<string>Lenguaje de programación</string> | |
</property> | |
<widget class="QRadioButton" name="rbPython"> | |
<property name="geometry"> | |
<rect> | |
<x>20</x> | |
<y>30</y> | |
<width>116</width> | |
<height>22</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Python</string> | |
</property> | |
<property name="checked"> | |
<bool>true</bool> | |
</property> | |
</widget> | |
<widget class="QRadioButton" name="rbPhp"> | |
<property name="geometry"> | |
<rect> | |
<x>20</x> | |
<y>60</y> | |
<width>116</width> | |
<height>22</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>PHP</string> | |
</property> | |
</widget> | |
<widget class="QRadioButton" name="rbPerl"> | |
<property name="geometry"> | |
<rect> | |
<x>130</x> | |
<y>30</y> | |
<width>81</width> | |
<height>22</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Perl</string> | |
</property> | |
</widget> | |
<widget class="QRadioButton" name="radioButton"> | |
<property name="geometry"> | |
<rect> | |
<x>130</x> | |
<y>60</y> | |
<width>61</width> | |
<height>22</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Ruby</string> | |
</property> | |
</widget> | |
</widget> | |
<widget class="QCheckBox" name="cbAceptarTerminos"> | |
<property name="geometry"> | |
<rect> | |
<x>80</x> | |
<y>160</y> | |
<width>171</width> | |
<height>22</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Aceptar los términos</string> | |
</property> | |
</widget> | |
<widget class="QPushButton" name="btAceptar"> | |
<property name="geometry"> | |
<rect> | |
<x>270</x> | |
<y>250</y> | |
<width>98</width> | |
<height>27</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>Aceptar</string> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblLenguaje"> | |
<property name="geometry"> | |
<rect> | |
<x>30</x> | |
<y>200</y> | |
<width>341</width> | |
<height>17</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>TextLabel</string> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblTerminos"> | |
<property name="geometry"> | |
<rect> | |
<x>30</x> | |
<y>230</y> | |
<width>331</width> | |
<height>17</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>TextLabel</string> | |
</property> | |
</widget> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>573</width> | |
<height>579</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<widget class="QSlider" name="horizontalSlider"> | |
<property name="geometry"> | |
<rect> | |
<x>30</x> | |
<y>30</y> | |
<width>341</width> | |
<height>29</height> | |
</rect> | |
</property> | |
<property name="orientation"> | |
<enum>Qt::Horizontal</enum> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblHorizontal"> | |
<property name="geometry"> | |
<rect> | |
<x>30</x> | |
<y>80</y> | |
<width>351</width> | |
<height>17</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string/> | |
</property> | |
</widget> | |
<widget class="QSlider" name="verticalSlider"> | |
<property name="geometry"> | |
<rect> | |
<x>130</x> | |
<y>89</y> | |
<width>29</width> | |
<height>451</height> | |
</rect> | |
</property> | |
<property name="orientation"> | |
<enum>Qt::Vertical</enum> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblVertical"> | |
<property name="geometry"> | |
<rect> | |
<x>250</x> | |
<y>290</y> | |
<width>221</width> | |
<height>17</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string/> | |
</property> | |
</widget> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>711</width> | |
<height>300</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Dialog</string> | |
</property> | |
<layout class="QGridLayout" name="gridLayout"> | |
<item row="0" column="0"> | |
<widget class="QTreeWidget" name="treeDirectorio"> | |
<column> | |
<property name="text"> | |
<string>Nombre</string> | |
</property> | |
</column> | |
<column> | |
<property name="text"> | |
<string>Fecha modificación</string> | |
</property> | |
</column> | |
<column> | |
<property name="text"> | |
<string>Tipo</string> | |
</property> | |
</column> | |
<column> | |
<property name="text"> | |
<string>Tamaño</string> | |
</property> | |
</column> | |
</widget> | |
</item> | |
<item row="2" column="0"> | |
<widget class="QLineEdit" name="edRuta"/> | |
</item> | |
<item row="1" column="0"> | |
<widget class="QLabel" name="lblBuscarDirectorio"> | |
<property name="text"> | |
<string>Buscar directorio:</string> | |
</property> | |
</widget> | |
</item> | |
<item row="3" column="0"> | |
<widget class="QPushButton" name="btBuscar"> | |
<property name="text"> | |
<string>Buscar</string> | |
</property> | |
</widget> | |
</item> | |
</layout> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>ventanaPrincipal</class> | |
<widget class="QMainWindow" name="ventanaPrincipal"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>800</width> | |
<height>600</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>Interfaces con PyQt4</string> | |
</property> | |
<widget class="QWidget" name="centralwidget"> | |
<widget class="QPushButton" name="btnBoton"> | |
<property name="geometry"> | |
<rect> | |
<x>280</x> | |
<y>120</y> | |
<width>141</width> | |
<height>91</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>PushButton</string> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblBienvenido"> | |
<property name="geometry"> | |
<rect> | |
<x>220</x> | |
<y>240</y> | |
<width>321</width> | |
<height>91</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>TextLabel</string> | |
</property> | |
</widget> | |
<widget class="QLabel" name="lblPosicion"> | |
<property name="geometry"> | |
<rect> | |
<x>250</x> | |
<y>40</y> | |
<width>231</width> | |
<height>41</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>TextLabel</string> | |
</property> | |
</widget> | |
</widget> | |
<widget class="QMenuBar" name="menubar"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>800</width> | |
<height>25</height> | |
</rect> | |
</property> | |
</widget> | |
<widget class="QStatusBar" name="statusbar"/> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment