本文整理汇总了Python中PyQt5.QtWidgets.QMdiSubWindow.setWindowTitle方法的典型用法代码示例。如果您正苦于以下问题:Python QMdiSubWindow.setWindowTitle方法的具体用法?Python QMdiSubWindow.setWindowTitle怎么用?Python QMdiSubWindow.setWindowTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QMdiSubWindow
的用法示例。
在下文中一共展示了QMdiSubWindow.setWindowTitle方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_window
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import setWindowTitle [as 别名]
def add_window(self, widget: QWidget, tab_name: str = None):
sub_window = QMdiSubWindow()
sub_window.setWidget(widget)
if tab_name is not None:
sub_window.setWindowTitle(tab_name)
self.subwindows[widget] = sub_window
self.ui.mdi_area.addSubWindow(sub_window)
示例2: _setup_effort_window
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import setWindowTitle [as 别名]
def _setup_effort_window(self):
from views import EffortWindow
window = QMdiSubWindow()
window.setWidget(EffortWindow())
window.setWindowTitle('Percent Effort')
window.hide()
self.ui.mdiArea.addSubWindow(window)
return window
示例3: _setup_employee_window
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import setWindowTitle [as 别名]
def _setup_employee_window(self):
from views import EmployeeWindow
window = QMdiSubWindow()
window.setWidget(EmployeeWindow())
window.setWindowTitle('Employees')
window.hide()
self.ui.mdiArea.addSubWindow(window)
return window
示例4: _setup_project_window
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import setWindowTitle [as 别名]
def _setup_project_window(self):
from views import ProjectWindow
window = QMdiSubWindow()
window.setWidget(ProjectWindow())
window.setWindowTitle('Projects')
window.hide()
self.ui.mdiArea.addSubWindow(window)
return window
示例5: __on_open
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import setWindowTitle [as 别名]
def __on_open(self):
window = QMdiSubWindow()
window.setAttribute(Qt.WA_DeleteOnClose, True)
window.setWindowTitle('Sub Window ' + str(MyMainWindow.window_index))
window.resize(300, 200)
self.mdi_area.addSubWindow(window)
window.show()
MyMainWindow.window_index += 1
示例6: open_python_editor
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import setWindowTitle [as 别名]
def open_python_editor(self):
editor = PyCodeEdit(server_script=server.__file__)
# we add the image browsing widget
sub = QMdiSubWindow(None, Qt.WindowShadeButtonHint)
sub.setWindowTitle("Editor")
sub.setWidget(editor)
sub.setWindowIcon(QIcon("gui/resources/icons/python.ico"))
self.mdiArea.addSubWindow(sub)
workspace.add(sub)
sub.show()
示例7: open_file
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import setWindowTitle [as 别名]
def open_file(self, msg):
file_name = PyQt5.QtWidgets.QFileDialog.getOpenFileName(self,'Open Image',' ',
'FITS Files (*.fits *.fit *.fts);;HDR Images (*.exr);;'
'Images (*.tiff *.tif *.png *.jpeg *.jpg *.bmp *.dib '
'*.jpe *.pbm *.pgm *.ppm *.sr *.ras *.jp2);;All (*)')
if(file_name[0]):
# Load the image from file
print(file_name[0])
im=Image(file_name[0])
pixmap = PyQt5.QtGui.QPixmap.fromImage(im.toqimage())
#we add the image browsing widget
sub = QMdiSubWindow(None, Qt.WindowShadeButtonHint)
sub.setWindowTitle("Browse")
label = QLabel()
label.setPixmap(pixmap)
sub.setWidget(label)
self.mdiArea.addSubWindow(sub)
workspace.add(sub)
sub.show()