Home »
Python »
PyQt MCQs
Which is the correct code statement to add an option in the menu in PyQt?
17. Which is the correct code statement to add an option in the menu in PyQt?
- menu.addNewMenu('option_name')
- menu.Add('option_name')
- menu.newMenu('option_name')
- menu.addMenu('option_name')
Answer: D) menu.addMenu('option_name')
Explanation:
The correct code statement to add an option in the menu in PyQt is:
menu.addMenu('option_name')
Where menu is the name of the menu bar and option_name is the new option to be added.