Python PyQt5 BUTTONS are easy! ðïļ
āļāļąāļ
- āđāļāļĒāđāļāļĢāđāđāļĄāļ·āđāļ 16 āļ.āļ. 2024
- #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_())
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_())
i think you should make a whole university man, your channel is full of years of programming science
Can't wait for 2 Milion subscribers!
You are too good..
please make a video on qml and python
nice
NGL after the __int__ was cool but didn't make real world sense.This opened up my eyes how to how you can use magic methods and others methods like that
how old are you?