本文整理匯總了Python中qtpy.QtWidgets.QMainWindow.statusBar方法的典型用法代碼示例。如果您正苦於以下問題:Python QMainWindow.statusBar方法的具體用法?Python QMainWindow.statusBar怎麽用?Python QMainWindow.statusBar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類qtpy.QtWidgets.QMainWindow
的用法示例。
在下文中一共展示了QMainWindow.statusBar方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: status_bar
# 需要導入模塊: from qtpy.QtWidgets import QMainWindow [as 別名]
# 或者: from qtpy.QtWidgets.QMainWindow import statusBar [as 別名]
def status_bar(qtbot):
"""Set up StatusBarWidget."""
win = QMainWindow()
win.setWindowTitle("Status widgets test")
win.resize(900, 300)
statusbar = win.statusBar()
qtbot.addWidget(win)
return (win, statusbar)
示例2: test
# 需要導入模塊: from qtpy.QtWidgets import QMainWindow [as 別名]
# 或者: from qtpy.QtWidgets.QMainWindow import statusBar [as 別名]
def test():
from qtpy.QtWidgets import QMainWindow
from spyder.utils.qthelpers import qapplication
app = qapplication(test_time=5)
win = QMainWindow()
win.setWindowTitle("Status widgets test")
win.resize(900, 300)
statusbar = win.statusBar()
status_widgets = []
for status_class in (MemoryStatus, CPUStatus):
status_widget = status_class(win, statusbar)
status_widgets.append(status_widget)
win.show()
app.exec_()
示例3: test
# 需要導入模塊: from qtpy.QtWidgets import QMainWindow [as 別名]
# 或者: from qtpy.QtWidgets.QMainWindow import statusBar [as 別名]
def test():
from qtpy.QtWidgets import QMainWindow
from spyder.utils.qthelpers import qapplication
app = qapplication(test_time=5)
win = QMainWindow()
win.setWindowTitle("Status widgets test")
win.resize(900, 300)
statusbar = win.statusBar()
swidgets = []
for klass in (ReadWriteStatus, EOLStatus, EncodingStatus,
CursorPositionStatus, MemoryStatus, CPUStatus):
swidget = klass(win, statusbar)
swidgets.append(swidget)
win.show()
app.exec_()