本文整理匯總了Python中PySide.QtGui.QFrame.show方法的典型用法代碼示例。如果您正苦於以下問題:Python QFrame.show方法的具體用法?Python QFrame.show怎麽用?Python QFrame.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PySide.QtGui.QFrame
的用法示例。
在下文中一共展示了QFrame.show方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: window
# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import show [as 別名]
#.........這裏部分代碼省略.........
# make an accelerator to create new tab
sequence = QKeySequence(Qt.CTRL + Qt.Key_T)
QShortcut(sequence, self, self.new_tab)
# make an accelerator to close tab
sequence = QKeySequence(Qt.CTRL + Qt.Key_W)
QShortcut(sequence, self, self.close_tab)
# make an accelerator to navigate tabs
sequence = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_Left)
QShortcut(sequence, self, self.previous_tab)
sequence = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_Right)
QShortcut(sequence, self, self.next_tab)
# make an accelerator to toggle inspector
sequence = QKeySequence(Qt.CTRL + Qt.ALT + Qt.Key_U)
QShortcut(sequence, self, self.handleShowInspector)
# make an accelerator to toggle bookmark
sequence = QKeySequence(Qt.CTRL + Qt.Key_D)
QShortcut(sequence, self, self.bookmark)
# make an accelerator to toggle task/project-list
sequence = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_L)
QShortcut(sequence, self, self.toggleTaskBar)
# finally set the attribute need to rotate
# try:
# self.setAttribute(Qt.WA_Maemo5AutoOrientation, True)
# except:
# print "not maemo"
self.statusbar.show()
def press_button(self):
"""On button press. Connected."""
self.sender().setStyleSheet('background-color: rgba(228, 228, 228)')
def release_button(self):
"""On button release. Connected."""
self.sender().setStyleSheet('background-color: rgba(252, 252, 252)')
def goHome(self):
"""Go to startpage."""
self.tabs.currentWidget().findChild(QFrame, unicode('pageWidget')).findChild(QWebView, unicode('webView')).setUrl(QUrl(self.startpage))
def handleShowInspector(self):
"""Toggle web inspector."""
self.tabs.currentWidget().findChild(QFrame, unicode('pageWidget')).findChild(QWebInspector, unicode('webInspector')).setShown(self.tabs.currentWidget().findChild(QFrame, unicode('pageWidget')).findChild(QWebInspector, unicode('webInspector')).isHidden())
def toggleTaskBar(self):
"""Toggle task bar."""
if self.tabs.currentWidget().findChild(QTreeView, unicode('taskList')).isHidden():
self.tabs.currentWidget().findChild(QTreeView, unicode('taskList')).setModel(self.tasklist)
self.tabs.currentWidget().findChild(QTreeView, unicode('taskList')).setShown(self.tabs.currentWidget().findChild(QTreeView, unicode('taskList')).isHidden())
#self.tasklist.setShown(self.tasklist.isHidden())
def focus_adress(self):
"""Focus adress bar."""
self.edit.selectAll()
self.edit.setFocus()
def toggle_input(self):
"""Toggle input visibility."""
if self.input_widget.isVisible():