action = QAction("Open", self)
action = QAction(QIcon("icon.png"), "Open", self)
action = QAction("Open", self) action.triggered.connect(self.open_file)This creates an action with the label "Open", and connects it to the "open_file" function. Overall, QAction is a useful class for creating interactive user interfaces in PyQT.