how to add a separator in a menubar pyqt5

Solutions on MaxInterview for how to add a separator in a menubar pyqt5 by the best coders in the world

showing results for - "how to add a separator in a menubar pyqt5"
Alice
19 Mar 2020
1# Works both for PyQt5.QtWidgets QMenu and QMenuBar
2menu = QMenu()
3first_action = menu.addAction("First")
4menu.addSeparator()
5second_action = menu.addAction("Second")