Added missing files and removed unnessesary ones
This commit is contained in:
32
Python/pyqt6_4/snippets/5.py
Executable file
32
Python/pyqt6_4/snippets/5.py
Executable file
@ -0,0 +1,32 @@
|
||||
import sys
|
||||
|
||||
from PyQt6.QtWidgets import QApplication, QWidget, QPushButton, QHBoxLayout
|
||||
|
||||
|
||||
class Window(QWidget):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.setGeometry(*(500,) * 4)
|
||||
self.setWindowTitle("Окно")
|
||||
|
||||
btn1 = QPushButton("One")
|
||||
btn2 = QPushButton("Two")
|
||||
btn3 = QPushButton("Three")
|
||||
|
||||
layout = QHBoxLayout()
|
||||
layout.addWidget(btn1)
|
||||
layout.addWidget(btn2)
|
||||
layout.addWidget(btn3)
|
||||
|
||||
self.setLayout(layout)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
app = QApplication(sys.argv)
|
||||
window = Window()
|
||||
window.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user