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


Python Qt.CustomizeWindowHint方法代码示例

本文整理汇总了Python中PyQt5.QtCore.Qt.CustomizeWindowHint方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.CustomizeWindowHint方法的具体用法?Python Qt.CustomizeWindowHint怎么用?Python Qt.CustomizeWindowHint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtCore.Qt的用法示例。


在下文中一共展示了Qt.CustomizeWindowHint方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [as 别名]
def __init__(self, parent=None):
        super(DesktopLyric, self).__init__()
        self.lyric = QString('Lyric Show.')
        self.intervel = 0
        self.maskRect = QRectF(0, 0, 0, 0)
        self.maskWidth = 0
        self.widthBlock = 0
        self.t = QTimer()
        self.screen = QApplication.desktop().availableGeometry()
        self.setObjectName(_fromUtf8("Dialog"))
        self.setWindowFlags(Qt.CustomizeWindowHint | Qt.FramelessWindowHint | Qt.Dialog | Qt.WindowStaysOnTopHint | Qt.Tool)
        self.setMinimumHeight(65)
        self.setAttribute(Qt.WA_TranslucentBackground)
        self.handle = lyric_handle(self)
        self.verticalLayout = QVBoxLayout(self)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.font = QFont(_fromUtf8('微软雅黑, verdana'), 50)
        self.font.setPixelSize(50)
        # QMetaObject.connectSlotsByName(self)
        self.handle.lyricmoved.connect(self.newPos)
        self.t.timeout.connect(self.changeMask) 
开发者ID:HuberTRoy,项目名称:MusicBox,代码行数:25,代码来源:player.py

示例2: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [as 别名]
def __init__(self, parent=None):
        super(ventanaPrincipal, self).__init__(parent)

        self.setWindowFlags(Qt.CustomizeWindowHint | Qt.WindowSystemMenuHint)
        self.setMinimumSize(800, 400)
        self.pressing = False

        # Aplicar Barra de Título personalizada
        tituloBarra = QVBoxLayout()
        tituloBarra.addWidget(barraTitulo(self))
        tituloBarra.setContentsMargins(0, 0, 0, 0)
        tituloBarra.addStretch(-1)

        self.setLayout(tituloBarra)

        self.initUI() 
开发者ID:andresnino,项目名称:PyQt5,代码行数:18,代码来源:barraTitulo.py

示例3: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [as 别名]
def __init__(self, parent=None):
        super(ventanaPrincipal, self).__init__(parent)

        self.setWindowFlags(Qt.CustomizeWindowHint | Qt.WindowSystemMenuHint)
        self.setFixedSize(800, 400)
        self.pressing = False

        # Aplicar Barra de Título personalizada
        tituloBarra = QVBoxLayout()
        tituloBarra.addWidget(barraTitulo(self))
        tituloBarra.setContentsMargins(0, 0, 0, 0)
        tituloBarra.addStretch(-1)

        self.setLayout(tituloBarra)

        self.initUI() 
开发者ID:andresnino,项目名称:PyQt5,代码行数:18,代码来源:barraTitulo.py

示例4: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [as 别名]
def __init__(self, etree, style, pkmeter, parent=None):
        PKWidget.__init__(self, etree, pkmeter, parent)
        self.pkmeter = pkmeter
        self.setStyleSheet(style)
        self.setAttribute(Qt.WA_TranslucentBackground)
        self.setWindowFlags(
            Qt.Tool |
            Qt.FramelessWindowHint |
            Qt.WindowStaysOnBottomHint |
            Qt.NoDropShadowWindowHint |
            Qt.CustomizeWindowHint)
        self.layout().setContentsMargins(0,0,0,0)
        self.layout().setSpacing(0)
        self._init_menu()
        pkmixins.DraggableMixin.__init__(self) 
开发者ID:pkkid,项目名称:pkmeter,代码行数:17,代码来源:pkwidgets.py

示例5: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [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

示例6: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [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

示例7: setupUi

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [as 别名]
def setupUi(self):
        ui_thread_fun_dlg.Ui_ThreadFunDlg.setupUi(self, self)
        self.setWindowFlags(self.windowFlags() | Qt.CustomizeWindowHint)
        # self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint)
        self.setWindowTitle(self.title)
        self.display_msg_signal.connect(self.setText)
        self.dlg_config_signal.connect(self.onConfigureDialog)
        self.show_window_signal.connect(self.onShowWindow)
        self.set_progress_value_signal.connect(self.setProgressValue)
        self.closeEvent = self.closeEvent
        # self.btnBox.accepted.connect(self.accept)
        # self.btnBox.rejected.connect(self.reject)
        self.progressBar.setVisible(False)
        self.btnBox.clear()
        self.btnBox.setCenterButtons(True)

        if self.buttons:
            for btn in self.buttons:
                assert isinstance(btn, dict)
                if btn.get('std_btn'):
                    b = self.btnBox.addButton(btn.get('std_btn'))
                elif btn.get('caption'):
                    if not btn.get('role'):
                        raise Exception("Button's role is mandatory")
                    b = self.btnBox.addButton(btn.get('caption'), btn.get('role'))
                else:
                    continue
                if btn.get('callback'):
                    b.clicked.connect(btn.get('callback'))
        if self.worker_fun:
            self.worker_thread = WorkerDlgThread(self, self.worker_fun, self.worker_args,
                                                 display_msg_signal=self.display_msg_signal,
                                                 set_progress_value_signal=self.set_progress_value_signal,
                                                 dlg_config_signal=self.dlg_config_signal,
                                                 show_dialog_signal=self.show_window_signal)
            self.worker_thread.finished.connect(self.threadFinished)

            # the user method controlled by the worker thread may need to access the widget
            # displaying a feedback for its non-standard purposes, so we expose it through
            # control object which is passed to that method
            self.worker_thread.ctrl_obj.set_msg_label(self.lblText)

        self.worker_result = None
        self.worker_exception = None
        if self.text:
            self.setText(self.text)
        if self.center_by_window:
            self.centerByWindow(self.center_by_window)
        if self.worker_fun:
            self.thread_running = True
            self.worker_thread.start()
        else:
            self.thread_running = False 
开发者ID:Bertrand256,项目名称:dash-masternode-tool,代码行数:55,代码来源:thread_fun_dlg.py

示例8: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CustomizeWindowHint [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.CustomizeWindowHint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。