一:計算器相關簡單功能的實現(xiàn) # 創(chuàng)建一個菜單條目 exitAction = QAction(QIcon('python\day09\exit3.png'),'退出',self) # 添加快捷鍵 exitAction.setShortcut('Ctrl+Q') # 添加一個提示 exitAction.setStatusTip('退出程序!') # 給菜單條目添加動作 exitAction.triggered.connect(qApp.quit) # 創(chuàng)建一個菜單欄 menuBar = self.menuBar() # 添加一個File菜單 fileMenu = menuBar.addMenu('File') # 添加菜單條目 fileMenu.addAction(exitAction) editMenu = menuBar.addMenu('Edit') editMenu.addAction(exitAction) 二:標簽; <html> 開始標簽 ,父標簽,標簽名,根標簽,雙標簽元素 head中定義頁面的樣式以及動態(tài)效果 <meta charset="utf-8":標簽的屬性,簡稱屬性 css cascding style sheet 層疊樣式表 body中是頁面所要展示的內容 </html><!-- 結束標簽 -->
|