当前位置: 首页>>代码示例>>Python>>正文


Python Qt.WindowTitleHint方法代码示例

本文整理汇总了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) 
开发者ID:BetaRavener,项目名称:uPyLoader,代码行数:19,代码来源:file_transfer_dialog.py

示例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()) 
开发者ID:Trilarion,项目名称:imperialism-remake,代码行数:36,代码来源:landBattleResultView.py

示例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() 
开发者ID:andresnino,项目名称:PyQt5,代码行数:11,代码来源:siacle.py

示例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() 
开发者ID:wonambi-python,项目名称:wonambi,代码行数:9,代码来源:settings.py

示例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() 
开发者ID:wonambi-python,项目名称:wonambi,代码行数:8,代码来源:info.py

示例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() 
开发者ID:wonambi-python,项目名称:wonambi,代码行数:12,代码来源:modal_widgets.py

示例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() 
开发者ID:wonambi-python,项目名称:wonambi,代码行数:10,代码来源:notes.py

示例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 
开发者ID:AresValley,项目名称:Artemis,代码行数:34,代码来源:download_window.py

示例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) 
开发者ID:teemu-l,项目名称:execution-trace-viewer,代码行数:54,代码来源:input_dialog.py


注:本文中的PyQt5.QtCore.Qt.WindowTitleHint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。