pyqt
QWidget
self.setWindowFlags(Qt.CustomizeWindowHint | Qt.FramelessWindowHint | Qt.Dialog) 去掉窗口的标题
self.resize(200,300)重新设置
setWindowIcon(QIcon(“res/ico/icon.ico”))设置程序窗口图标
.hide()
setShortcut(_translate("MainWindow", "Ctrl+O", None))
ToolBar
self.homeAct = QAction(QIcon("res/ico/home.ico"), "&首页", self, triggered=self.homePage)
self.toolbar = self.addToolBar('Home') 增加工具栏
self.toolbar.addAction(self.homeAct) 增加Action
MenuBar
self.addAvatarAct = QAction(QIcon("res/ico/addAvatar.ico"), "&Add Avatar", self, triggered=self.addAvatar)#增加Action
self.addMenu = self.menuBar().addMenu("&添加")#增加菜单栏
self.addMenu.addAction(self.addAvatarAct)#在菜单栏增加Action
StatusBar
self.statusBar().showMessage("数据加载完成")
Layout