Home »
MCQs »
Pygame MCQs
Which is the correct code statement to add an option in the menu in PyQt?
16. 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
The correct answer is: 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 menu bar and 'option_name' is the new option to be added.