Тёмный

Python PyQt5 BUTTONS are easy! 🛎️ 

Bro Code
Подписаться 2,2 млн
Просмотров 2,1 тыс.
50% 1

#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_())

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@BroCodez
@BroCodez 2 месяца назад
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_())
@CourageCatalyst11
@CourageCatalyst11 2 месяца назад
i think you should make a whole university man, your channel is full of years of programming science
@IosebiGames
@IosebiGames 2 месяца назад
Can't wait for 2 Milion subscribers!
@pradeeppardeep1943
@pradeeppardeep1943 2 месяца назад
You are too good..
@thedogecraftolda
@thedogecraftolda 2 месяца назад
please make a video on qml and python
@aye9449
@aye9449 2 месяца назад
nice
@alvinamana1459
@alvinamana1459 29 дней назад
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
@chukwuebukauche-uchegbu6697
@chukwuebukauche-uchegbu6697 2 месяца назад
how old are you?
Далее
Python PyQt5 CHECKBOXES are easy! ✅
6:31
Просмотров 1,5 тыс.
10 Important Python Concepts In 20 Minutes
18:49
Просмотров 195 тыс.
Fake watermelon by Secret Vlog
00:16
Просмотров 4,6 млн
Mübariz İbrahimovun atası vəfat etdi
00:14
Просмотров 144 тыс.
Learn Python PyQt5 in 1 hour! 🐍 (2024)
1:10:29
Просмотров 14 тыс.
My 10 “Clean” Code Principles (Start These Now)
15:12
10 Crazy Python Operators That I Rarely Use
11:37
Просмотров 37 тыс.
Python PyQt5 add CSS-like properties easy! 🎨
10:53
Просмотров 2,7 тыс.
Let's code a STOPWATCH in Python! ⏱
17:58
Просмотров 7 тыс.
What You Need To Know About Python 3.13
15:45
Просмотров 9 тыс.
JavaScript Event Loop -- Visualized!
29:43
Просмотров 14 тыс.
Please Master These 10 Python Functions…
22:17
Просмотров 182 тыс.
Fake watermelon by Secret Vlog
00:16
Просмотров 4,6 млн