mirror of
https://github.com/maicss/PyQt5-Chinese-tutorial.git
synced 2025-01-24 21:12:54 +08:00
Update hello_world.md
This commit is contained in:
parent
d602bf3ac2
commit
3268fb6bfd
@ -344,7 +344,7 @@ from PyQt5.QtCore import QCoreApplication
|
|||||||
qbtn = QPushButton('Quit', self)
|
qbtn = QPushButton('Quit', self)
|
||||||
```
|
```
|
||||||
|
|
||||||
创建一个继承自`QPushButton`的按钮。第一个参数是按钮的文本,第二个参数是按钮的父级组件,这个例子中,父级组件就是我们创建的继承自`Qwidget`的`Example`类。
|
创建一个继承自`QPushButton`的按钮。第一个参数是按钮的文本,第二个参数是按钮的父级组件,这个例子中,父级组件就是我们创建的继承自`QWidget`的`Example`类。
|
||||||
|
|
||||||
```text
|
```text
|
||||||
qbtn.clicked.connect(QCoreApplication.instance().quit)
|
qbtn.clicked.connect(QCoreApplication.instance().quit)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user