本文整理汇总了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():