#pythontutorial #python #pythonprogramming
#Python PushButtons
import sys
from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton, QLabel
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setGeometry(700, 300, 500, 500)
self.button = QPushButton("Click me!", self)
self.initUI()
def initUI(self):
self.button.setGeometry(150, 200, 200, 100)
self.button.setStyleSheet("font-size: 30px;")
self.button.clicked.connect(self.on_click)
def on_click(self):
print("Button clicked!")
if _name_ == '__main__':
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec_())
En esta página del sitio puede ver el video en línea Create Python buttons in 7 minutes! 🛎️ de Duración hora minuto segunda en buena calidad , que subió el usuario Bro Code 26 julio 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 13,174 veces y le gustó 244 a los espectadores. Disfruta viendo!