def __init__(self, app): Abstract.__init__(self, app) window = self.get_app().get_window() menubar = QtGui.QMenuBar(window) menubar.setGeometry(QtCore.QRect(0, 0, 800, 24)) menubar.setObjectName("menubar") menu_upload = QtGui.QMenu(menubar) menu_upload.setObjectName("menu_upload") # self.actions['art'] = Action_Art(app, menu_upload) self.actions['cg_pack'] = Action_Pack(app, menu_upload) # self.actions['post'] = post.Action_Post(app, menu_upload) self.actions['quit'] = Action_Quit(app, menu_upload) menu_upload.setTitle(self.utf('Залить')) menubar.addAction(menu_upload.menuAction()) menu_about = QtGui.QMenu(menubar) menu_about.setObjectName("menu_upload") self.actions['about'] = Action_About(app, menu_about) self.actions['help'] = Action_Help(app, menu_about) menu_about.setTitle(self.utf('Помощь')) menubar.addAction(menu_about.menuAction()) window.setMenuBar(menubar)
def __init__(self, app): Abstract.__init__(self, app) widget = self.get_window().centralWidget() if widget: widget.close() self._layout = QtGui.QVBoxLayout() self._box = QtGui.QGroupBox(self.get_window()) self._box.setGeometry(0, 0, 600, 480) self._box.setLayout(self._layout) self.get_window().setCentralWidget(self._box)
def __init__(self, app, menu): Abstract.__init__(self, app) self._action = self.build_action() menu.addAction(self._action)