mirror of
https://github.com/maicss/PyQt5-Chinese-tutorial.git
synced 2025-01-24 21:12:54 +08:00
exitAction -> exitAct
This commit is contained in:
parent
a13a4b3bcf
commit
a6eef02195
@ -129,7 +129,7 @@ exitAct.triggered.connect(QApplication.instance().quit)
|
||||
``` python
|
||||
menubar = self.menuBar()
|
||||
fileMenu = menubar.addMenu('&File')
|
||||
fileMenu.addAction(exitAction)
|
||||
fileMenu.addAction(exitAct)
|
||||
```
|
||||
`menuBar` 方法创建了一个菜单栏,然后使用 `addMenu` 创建一个文件菜单,使用 `addAction` 创建一个行为。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user