本文整理汇总了Python中PyQt5.QtCore.Qt.WindowTitleHint方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.WindowTitleHint方法的具体用法?Python Qt.WindowTitleHint怎么用?Python Qt.WindowTitleHint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore.Qt
的用法示例。
在下文中一共展示了Qt.WindowTitleHint方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, type):
super(FileTransferDialog, self).__init__(None, Qt.WindowTitleHint)
self.setupUi(self)
self.setModal(True)
self._transfer = FileTransfer(lambda: self._update_signal.emit())
if type == FileTransferDialog.UPLOAD:
self.label.setText("Saving file.")
elif type == FileTransferDialog.DOWNLOAD:
self.label.setText("Reading file.")
self.progressBar.setRange(0, 100)
self.progressBar.setValue(0)
self._update_signal.connect(self._update_progress)
self.cancelButton.clicked.connect(self._transfer.cancel)
示例2: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, conf, defeat):
self.config = conf
super().__init__()
self.setWindowTitle(conf.get_text('victory'))
self.setFixedSize(QSize(640, 480))
self.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.WindowTitleHint | Qt.FramelessWindowHint)
button = QPushButton(conf.get_text('close'), self)
button.setCheckable(True)
button.setFixedSize(QSize(640, 30))
button.move(0, 450)
# noinspection PyUnresolvedReferences
button.clicked.connect(self.close)
result_output = QTextEdit(self)
result_output.setReadOnly(True)
result_output.setFixedSize(QSize(640, 200))
result_output.move(0, 250)
result_output.setLineWrapMode(QTextEdit.NoWrap)
result_output.insertHtml(self.generate_result_text())
gview = QGraphicsView(self)
scene = QGraphicsScene()
if defeat:
img = conf.theme_selected.get_defeat_pixmap()
text = conf.get_text('defeat')
else:
img = conf.theme_selected.get_victory_pixmap()
text = conf.get_text('victory')
scene.addPixmap(img.scaled(QSize(640, 220)))
gview.move(0, 30)
gview.setScene(scene)
label_title = QLabel(self)
label_title.setText(text)
label_title.setFixedSize(QSize(640, 30))
label_title.setAlignment(Qt.AlignCenter)
label_title.setFont(self.get_font_title())
示例3: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, parent=None):
super(Ayuda, self).__init__()
self.setWindowTitle("Ayuda")
self.setWindowFlags(Qt.WindowTitleHint | Qt.CustomizeWindowHint |
Qt.MSWindowsFixedSizeDialogHint)
self.setFixedSize(450, 500)
self.initUI()
示例4: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, parent):
super().__init__(None, Qt.WindowSystemMenuHint | Qt.WindowTitleHint)
self.parent = parent
self.config = ConfigUtils(self.parent.refresh)
self.setWindowTitle('Settings')
self.create_settings()
示例5: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, parent):
super().__init__(None, Qt.WindowSystemMenuHint | Qt.WindowTitleHint)
self.parent = parent
self.setWindowModality(Qt.ApplicationModal)
self.create_dialog()
示例6: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, parent):
super().__init__(None, Qt.WindowSystemMenuHint | Qt.WindowTitleHint)
self.parent = parent
self.setWindowModality(Qt.WindowModal)
self.groups = self.parent.channels.groups
self.index = {}
self.cycles = None
self.create_widgets()
示例7: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, parent):
super().__init__(None, Qt.WindowSystemMenuHint | Qt.WindowTitleHint)
self.parent = parent
self.setWindowTitle('Merge events')
self.setWindowModality(Qt.ApplicationModal)
self.create_dialog()
示例8: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self):
"""Initialize the window."""
super().__init__()
self.setupUi(self)
self.setWindowFlags(
# Qt.Window |
Qt.CustomizeWindowHint |
Qt.WindowTitleHint |
Qt.WindowCloseButtonHint |
Qt.WindowStaysOnTopHint
)
self._no_internet_msg = pop_up(self, title=Messages.NO_CONNECTION,
text=Messages.NO_CONNECTION_MSG,
connection=self.close)
self._bad_db_download_msg = pop_up(self, title=Messages.BAD_DOWNLOAD,
text=Messages.BAD_DOWNLOAD_MSG,
connection=self.close)
self._slow_conn_msg = pop_up(self, title=Messages.SLOW_CONN,
text=Messages.SLOW_CONN_MSG,
connection=self.close)
self._download_thread = DownloadThread()
self._download_thread.finished.connect(self._wait_close)
self._download_thread.progress.connect(self._display_progress)
self._download_thread.speed_progress.connect(self._display_speed)
self.closed.connect(self._download_thread.set_exit)
self.cancel_btn.clicked.connect(self._terminate_process)
self._size = 0
self.target = None
示例9: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import WindowTitleHint [as 别名]
def __init__(self, parent=None, title="Title", data=[], on_ok_clicked=None):
QWidget.__init__(self, parent)
self.setWindowFlags(
Qt.Dialog
| Qt.WindowTitleHint
| Qt.CustomizeWindowHint
| Qt.WindowCloseButtonHint
)
self.data = data
self.output_data = []
self.on_ok_clicked = on_ok_clicked
mainLayout = QGridLayout()
# create labels and input widgets
for i, item in enumerate(self.data):
label_widget = QLabel(item["label"] + ":")
if isinstance(item["data"], bool):
input_widget = QCheckBox()
input_widget.setChecked(item["data"])
elif isinstance(item["data"], (int, str)):
default = str(item.get("data", ""))
input_widget = QLineEdit(default)
elif isinstance(item["data"], list):
input_widget = QComboBox()
input_widget.addItems(item["data"])
else:
print(f"Error. Unknown data type: {type(item['data'])}")
return
if "tooltip" in item:
input_widget.setToolTip(str(item["tooltip"]))
label_widget.setToolTip(str(item["tooltip"]))
item["widget"] = input_widget
mainLayout.addWidget(label_widget, i, 0)
mainLayout.addWidget(input_widget, i, 1)
ok_btn = QPushButton("Ok")
ok_btn.clicked.connect(self.on_ok_btn_clicked)
mainLayout.addWidget(ok_btn)
cancel_btn = QPushButton("Cancel")
cancel_btn.clicked.connect(self.on_cancel_btn_clicked)
mainLayout.addWidget(cancel_btn)
self.setLayout(mainLayout)
self.setWindowTitle(title)