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


Python Qt.ApplicationModal方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, pipe, app_mode=False, **kwargs):
        super().__init__(**kwargs)
        self.setWindowTitle(translate('GstPipelineEdit', 'Edit Pipeline'))
        self.setWindowModality(Qt.ApplicationModal)
        self.setMaximumSize(500, 400)
        self.setMinimumSize(500, 400)
        self.resize(500, 400)
        self.setLayout(QVBoxLayout())

        # GstPipeEdit
        self.pipeEdit = GstPipeEdit(pipe, app_mode=app_mode, parent=self)
        self.layout().addWidget(self.pipeEdit)

        # Confirm/Cancel buttons
        self.dialogButtons = QDialogButtonBox(self)
        self.dialogButtons.setStandardButtons(QDialogButtonBox.Cancel |
                                              QDialogButtonBox.Ok)
        self.layout().addWidget(self.dialogButtons)

        self.dialogButtons.accepted.connect(self.accept)
        self.dialogButtons.rejected.connect(self.reject) 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:23,代码来源:gst_pipe_edit.py

示例2: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)

        self.setWindowModality(Qt.ApplicationModal)
        self.setLayout(QVBoxLayout())
        self.setMaximumSize(300, 200)
        self.setMinimumSize(300, 200)
        self.resize(300, 200)

        self.listWidget = QListWidget(self)
        self.listWidget.setAlternatingRowColors(True)
        self.listWidget.setSelectionMode(self.listWidget.MultiSelection)
        self.layout().addWidget(self.listWidget)

        self.dialogButton = QDialogButtonBox(self)
        self.dialogButton.setStandardButtons(self.dialogButton.Ok)
        self.dialogButton.accepted.connect(self.accept)
        self.layout().addWidget(self.dialogButton)

        self.retranslateUi()

        self._discoverer = Discoverer()
        self._discoverer.discovered.connect(self._new_peer, Connection.QtQueued) 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:25,代码来源:peers_discovery_dialog.py

示例3: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, service: VideoService, parent=None, flags=Qt.Dialog | Qt.WindowCloseButtonHint):
        super(StreamSelector, self).__init__(parent, flags)
        self.service = service
        self.parent = parent
        self.streams = service.streams
        self.config = service.mappings
        self.setObjectName('streamselector')
        self.setWindowModality(Qt.ApplicationModal)
        self.setWindowTitle('Media streams - {}'.format(os.path.basename(self.parent.currentMedia)))
        buttons = QDialogButtonBox(QDialogButtonBox.Ok, self)
        buttons.accepted.connect(self.close)
        layout = QVBoxLayout()
        layout.setSpacing(15)
        if len(self.streams.video):
            layout.addWidget(self.video())
        if len(self.streams.audio):
            layout.addWidget(self.audio())
        if len(self.streams.subtitle):
            layout.addWidget(self.subtitles())
        layout.addWidget(buttons)
        self.setLayout(layout) 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:23,代码来源:mediastream.py

示例4: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, parent=None):
        with open(self.TEMPLATE) as tmpl:
            template = ElementTree.fromstring(tmpl.read())
        PKWidget.__init__(self, template, self, parent)
        self.setWindowTitle('About PKMeter')
        self.setWindowFlags(Qt.Dialog)
        self.setWindowModality(Qt.ApplicationModal)
        self.setWindowIcon(QtGui.QIcon(QtGui.QPixmap('img:logo.png')))
        self.layout().setContentsMargins(0,0,0,0)
        self.layout().setSpacing(0)
        self._init_stylesheet()
        self.manifest.version.setText('Version %s' % VERSION)
        self.manifest.qt.setText('QT v%s, PyQT v%s' % (QT_VERSION_STR, PYQT_VERSION_STR)) 
开发者ID:pkkid,项目名称:pkmeter,代码行数:15,代码来源:about.py

示例5: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, pkmeter, parent=None):
        with open(self.TEMPLATE) as tmpl:
            template = ElementTree.fromstring(tmpl.read())
        PKWidget.__init__(self, template, self, parent)
        self.pkmeter = pkmeter                          # Save reference to pkmeter
        self._init_window()                             # Init ui window elements
        self.values = self.load()                       # Active configuration values
        self.listitems = []                             # List of items in the sidebar
        self.datatable = self._init_datatable()         # Init reusable data table
        self.pconfigs = self._init_pconfigs()           # Reference to each plugin config
        self.setWindowFlags(Qt.Dialog)
        self.setWindowModality(Qt.ApplicationModal) 
开发者ID:pkkid,项目名称:pkmeter,代码行数:14,代码来源:pkconfig.py

示例6: _init_window

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def _init_window(self):
        # Load core stylesheet
        stylepath = os.path.join(SHAREDIR, 'pkmeter.css')
        with open(stylepath) as handle:
            self.setStyleSheet(handle.read())
        # Init self properties
        self.setWindowTitle('PKMeter Preferences')
        self.setWindowModality(Qt.ApplicationModal)
        self.setWindowIcon(QtGui.QIcon(QtGui.QPixmap('img:logo.png')))
        self.layout().setContentsMargins(10,10,10,10)
        # Init window elements
        self.manifest.tabbar.setExpanding(False)
        self.manifest.tabbar.addTab('Settings')
        self.manifest.tabbar.addTab('Data')
        self.manifest.contents.setSizePolicy(QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding))
        self.manifest.tabbar.currentChanged.connect(self.load_tab)
        # Init the ListWidget
        listwidget = self.manifest.list
        for module in sorted(self.pkmeter.modules.values(), key=self._sortKey):
            if getattr(module, 'Plugin', None) or getattr(module, 'Config', None):
                item = QtWidgets.QListWidgetItem(utils.name(module), parent=listwidget, type=0)
                item.setData(NAMESPACE_ROLE, utils.namespace(module))
                listwidget.addItem(item)
        self.manifest.list.itemSelectionChanged.connect(self.load_tab) 
开发者ID:pkkid,项目名称:pkmeter,代码行数:28,代码来源:pkconfig.py

示例7: __init__

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

        self.setWindowModality(Qt.ApplicationModal)
        self.setWindowTitle(translate('ReplayGain', 'Processing files ...'))
        self.setMaximumSize(320, 110)
        self.setMinimumSize(320, 110)
        self.resize(320, 110)

        self.setMaximum(maximum)
        self.setLabelText('0 / {0}'.format(maximum)) 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:13,代码来源:gain_ui.py

示例8: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, parent=None, theme: str='light', flags=Qt.Dialog | Qt.WindowCloseButtonHint):
        super(UpdaterMsgBox, self).__init__(parent, flags)
        self.parent = parent
        self.theme = theme
        self.setWindowTitle('{} updates'.format(qApp.applicationName()))
        self.setWindowModality(Qt.ApplicationModal)
        self.setObjectName('updaterdialog')
        self.loading = VCProgressDialog(self.parent)
        self.loading.setText('contacting server')
        self.loading.setMinimumWidth(485)
        self.loading.show() 
开发者ID:ozmartian,项目名称:vidcutter,代码行数:13,代码来源:updater.py

示例9: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, center_widget, title, parent, hide_close=False):
        super().__init__(None)
        self.setupUi(self)
        self.setModal(True)
        self.setObjectName("GreyedDialog")
        self.setWindowModality(Qt.ApplicationModal)
        self.button_close.apply_style()
        if platform.system() == "Windows":
            # SplashScreen on Windows freezes the Window
            self.setWindowFlags(Qt.FramelessWindowHint)
        else:
            # FramelessWindowHint on Linux (at least xfce) is less pretty
            self.setWindowFlags(Qt.SplashScreen)
        self.setAttribute(Qt.WA_TranslucentBackground)
        self.center_widget = center_widget
        self.main_layout.addWidget(center_widget)
        if not title and hide_close:
            self.widget_title.hide()
        if title:
            self.label_title.setText(title)
        if hide_close:
            self.button_close.hide()
        main_win = ParsecApp.get_main_window()
        if main_win:
            if main_win.isVisible():
                self.setParent(main_win)
                self.resize(main_win.size())
            else:
                self.showMaximized()
            self.move(0, 0)
        else:
            logger.error("GreyedDialog did not find the main window, this is probably a bug")
        self.setFocus()
        self.accepted.connect(self.on_finished)
        self.rejected.connect(self.on_finished) 
开发者ID:Scille,项目名称:parsec-cloud,代码行数:37,代码来源:custom_dialogs.py

示例10: show_login_dialog

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def show_login_dialog(self):
        """显示登录对话框"""
        login_dialog = LoginDialog(self._config)
        login_dialog.clicked_ok.connect(self.call_login_luncher)
        login_dialog.setWindowModality(Qt.ApplicationModal)
        login_dialog.exec() 
开发者ID:rachpt,项目名称:lanzou-gui,代码行数:8,代码来源:gui.py

示例11: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self):
        super().__init__(None, Qt.WindowSystemMenuHint | Qt.WindowTitleHint)
        self.setWindowTitle('Help')
        self.setWindowModality(Qt.ApplicationModal)

        self.create_dialog() 
开发者ID:wonambi-python,项目名称:wonambi,代码行数:8,代码来源:settings.py

示例12: __init__

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

示例13: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def __init__(self, parent=None):
        if Figure is None:
            return
        super().__init__(parent)
        self.setWindowModality(Qt.ApplicationModal)

        self.parent = parent
        self.canvas = PlotCanvas(self)
        self.toolbar = NavigationToolbar(self.canvas, self)

        self.create_dialog() 
开发者ID:wonambi-python,项目名称:wonambi,代码行数:13,代码来源:analysis.py

示例14: create_contract_win

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def create_contract_win(self):
        # 增加合约槽函数,弹出合约设置窗口
        self.set_default_value()
        self.main_contractWin.setWindowModality(Qt.ApplicationModal)  # 阻塞父窗口
        self.main_contractWin.show() 
开发者ID:epolestar,项目名称:equant,代码行数:7,代码来源:view.py

示例15: contractSelect

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import ApplicationModal [as 别名]
def contractSelect(self, exchange, commodity, contract):
        self.contractSelectWin = ContractSelect(exchange, commodity, contract)
        self.contractSelectWin.setObjectName("ContractSelectWin")
        self.main_contractSelectWin = FramelessWindow()
        # self.main_contractSelectWin.setFixedSize(750, 550)
        # 设置窗口的大小和位置
        _pGeometry = self.main_contractWin.frameGeometry()
        self.main_contractSelectWin.resize(_pGeometry.width() * 1.5, _pGeometry.height() * 1.5)
        self.main_contractSelectWin.center(_pGeometry)
        self.main_contractSelectWin.titleBar.theseSelect.hide()
        self.main_contractSelectWin.titleBar.iconLabel.hide()
        self.main_contractSelectWin.disabledMaximumBtn()
        self.main_contractSelectWin.disabledMinimunBtn()
        self.main_contractSelectWin.setWindowTitle('选择合约')
        self.main_contractSelectWin.titleBar.buttonClose.clicked.connect(self.main_contractSelectWin.close)
        self.main_contractSelectWin.setWidget(self.contractSelectWin)
        if self._control.mainWnd.getWinThese() == '浅色':
            style = CommonHelper.readQss(WHITESTYLE)
        else:
            style = CommonHelper.readQss(DARKSTYLE)
        self.main_contractSelectWin.setStyleSheet('')
        self.main_contractSelectWin.setStyleSheet(style)
        self.main_contractSelectWin.setWindowModality(Qt.ApplicationModal)  # 阻塞父窗口
        self.main_contractSelectWin.show()
        self.contractSelectWin.confirm.clicked.connect(self.set_contract)
        self.contractSelectWin.cancel.clicked.connect(self.main_contractSelectWin.close) 
开发者ID:epolestar,项目名称:equant,代码行数:28,代码来源:view.py


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