2 other operations on QMenuBar 2.1 add Icon ![]() The process of operation is to create QMenuBar for dialog box first, then add QMenu or QAction directly to dialog box, QMenu can continue to nest and add QMenu or QAction, always QMenu is used for selection, and the real click is QAction. addMenu ( "A1" ) #Menu nested submenuĪctionA2 = MenuA. menuBar ( ) #Get the menu bar of the main dialog QtWidgets import QApplication, QMainWindow, QMenuBar, QMenu We tried to add a menu bar to the main dialog and add menu items to the menu bar.Įxample code: from PySide2. If you think this is a good blog, I hope you can give a little praise, thank you for your support. ![]() What can I learn from reading this article?Įach dialog box can be set with a menu bar, which is the best control for the category management button. ![]() Basic part of PySide2 (12) - Application of QMenuBar and QMenu
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |