pyqt menu

Do you want a menu in your PyQt app?

Pyqt has menu support. Almost every GUI app has a main menu at the top of the window. Adding a menu works slightly different than adding widgets.

pyqt menu

A menu can contain sub menus, they are usually something like (File, Edit, View, History, Help). Every menu has actions.

Related course:

Pyqt menu example

The menu is created with:

Then actions are added to the file menu:

These actions must be defined beforehand:

Complete code:

Previous Post
Next Post

Leave a Reply