本文整理汇总了Python中PyQt5.QtWidgets.QMdiSubWindow.show方法的典型用法代码示例。如果您正苦于以下问题:Python QMdiSubWindow.show方法的具体用法?Python QMdiSubWindow.show怎么用?Python QMdiSubWindow.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QMdiSubWindow
的用法示例。
在下文中一共展示了QMdiSubWindow.show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __on_open
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import show [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
示例2: open_python_editor
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import show [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()
示例3: open_file
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import show [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()
示例4: MainWindow
# 需要导入模块: from PyQt5.QtWidgets import QMdiSubWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMdiSubWindow import show [as 别名]
class MainWindow(QMainWindow):
def __init__(self, win_arg):
super(MainWindow, self).__init__()
loadUi(getcwd() + '/ui/main.ui', self)
self.mdi.setBackground(QBrush(QImage(getcwd() + "/images/logo.png")))
self.setWindowIcon(QIcon(getcwd() + "/images/icon.ico"))
self.menu_3.setEnabled(False)
if "-FS" in win_arg:
self.arg_FS()
logging.config.fileConfig(getcwd() + '/setting/logger_conf.ini')
self.logger = logging.getLogger("MainLog")
self.show()
self.setDisabled(True)
self.login = login_window.LoginWindow(self)
# self.admin_login()
def access(self):
for item in User().access_list(self.__class__.__name__):
a = getattr(self, item["atr1"])
if item["atr2"]:
a = getattr(a, item["atr2"])
if item["value"]:
try:
val = int(item["value"])
except:
val = item["value"]
a(val)
else:
a()
def view_material(self):
self.material = supply_material.MaterialSupplyList()
self.sub_material = QMdiSubWindow()
self.sub_material.setWidget(self.material)
self.mdi.addSubWindow(self.sub_material)
self.sub_material.resize(self.material.size())
self.sub_material.show()
def view_material_provider(self):
self.mat_prov = provider.ProviderMaterial()
self.sub_provider = QMdiSubWindow()
self.sub_provider.setWidget(self.mat_prov)
self.mdi.addSubWindow(self.sub_provider)
self.sub_provider.resize(self.mat_prov.size())
self.sub_provider.show()
def view_material_name(self):
self.material_neme = supply_material.MaterialName()
self.sub_mater_name = QMdiSubWindow()
self.sub_mater_name.setWidget(self.material_neme)
self.mdi.addSubWindow(self.sub_mater_name)
self.sub_mater_name.resize(self.material_neme.size())
self.sub_mater_name.show()
def view_comparing_name(self):
self.comparing_name = comparing.ComparingName()
self.sub_comp_name = QMdiSubWindow()
self.sub_comp_name.setWidget(self.comparing_name)
self.mdi.addSubWindow(self.sub_comp_name)
self.sub_comp_name.resize(self.comparing_name.size())
self.sub_comp_name.show()
def view_accessories_name(self):
self.accessories_name = supply_accessories.AccessoriesName()
self.sub_accsess_name = QMdiSubWindow()
self.sub_accsess_name.setWidget(self.accessories_name)
self.mdi.addSubWindow(self.sub_accsess_name)
self.sub_accsess_name.resize(self.accessories_name.size())
self.sub_accsess_name.show()
def view_accessories_provider(self):
self.access_prov = provider.ProviderAccessories()
self.sub_provider_access = QMdiSubWindow()
self.sub_provider_access.setWidget(self.access_prov)
self.mdi.addSubWindow(self.sub_provider_access)
self.sub_provider_access.resize(self.access_prov.size())
self.sub_provider_access.show()
def view_accessories(self):
self.accessories = supply_accessories.AccessoriesSupplyList()
self.accessories.set_settings()
self.sub_accessories = QMdiSubWindow()
self.sub_accessories.setWidget(self.accessories)
self.mdi.addSubWindow(self.sub_accessories)
self.sub_accessories.resize(self.accessories.size())
self.sub_accessories.show()
def view_staff_country(self):
self.staff_country = staff.Country()
self.sub_staff_country = QMdiSubWindow()
self.sub_staff_country.setWidget(self.staff_country)
self.mdi.addSubWindow(self.sub_staff_country)
self.sub_staff_country.resize(self.staff_country.size())
self.sub_staff_country.show()
#.........这里部分代码省略.........