class Window(QMainWindow):
# Snip...
def _createActions(self):
# File actions
self.newAction = QAction(self)
self.newAction.setText(
"&New"
)
self.newAction.setIcon(QIcon(
":file-new.svg"
))
self.openAction = QAction(QIcon(
":file-open.svg"
),
"&Open..."
, self)
self.saveAction = QAction(QIcon(
":file-save.svg"
),
"&Save"
, self)
self.exitAction = QAction(
"&Exit"
, self)
# Edit actions
self.copyAction = QAction(QIcon(
":edit-copy.svg"
),
"&Copy"
, self)
self.pasteAction = QAction(QIcon(
":edit-paste.svg"
),
"&Paste"
, self)
self.cutAction = QAction(QIcon(
":edit-cut.svg"
),
"C&ut"
, self)
# Snip...