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


Python Qt.CaseInsensitive方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def __init__(self, model, linktypes, fromname, parent=None):
        super(DialogLinkTo, self).__init__(parent)  # overrride accept method
        self.linktype = None
        self.linkitem = None
        self.linktypes = linktypes
        self.model = model

        self.setupUi()
        completer = QtWidgets.QCompleter()#[x['name'] for x in model.nativedata])
        completer.setCompletionMode(QtWidgets.QCompleter.InlineCompletion)
        completer.setCompletionColumn(0)
        completer.setCompletionRole(Qt.DisplayRole)
        completer.setCaseSensitivity(Qt.CaseInsensitive)
        completer.setModel(model)
        self.lineEdit.setCompleter(completer)

        self.combo.setModel(linktypes)
        self.setWindowTitle('Create link to %s'%fromname)
        self.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed); 
开发者ID:ccbogel,项目名称:QualCoder,代码行数:21,代码来源:add_item_name.py

示例2: set_pattern

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def set_pattern(self, val):
        """Setter for pattern.

        Args:
            val: The value to set.
        """
        self._pattern = val
        val = re.sub(r' +', r' ', val)  # See #1919
        val = re.escape(val)
        val = val.replace(r'\ ', '.*')
        rx = QRegExp(val, Qt.CaseInsensitive)
        self.setFilterRegExp(rx)
        self.invalidate()
        sortcol = 0
        self.sort(sortcol) 
开发者ID:qutebrowser,项目名称:qutebrowser,代码行数:17,代码来源:listcategory.py

示例3: filter_table

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def filter_table(self, text):
        reg_exp = QRegExp(text, Qt.CaseInsensitive)
        self.setFilterRegExp(reg_exp) 
开发者ID:MTG,项目名称:dunya-desktop,代码行数:5,代码来源:proxymodel.py

示例4: _on_user_find_success

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def _on_user_find_success(self, job):
        users = job.ret
        completer = QCompleter(users)
        completer.setCaseSensitivity(Qt.CaseInsensitive)
        self.line_edit_share.setCompleter(completer)
        self.line_edit_share.completer().complete() 
开发者ID:Scille,项目名称:parsec-cloud,代码行数:8,代码来源:workspace_sharing_widget.py

示例5: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def __init__(
        self,
        message,
        placeholder="",
        default_text="",
        completion=None,
        button_text=None,
        validator=None,
    ):
        super().__init__()
        self.setupUi(self)
        self.dialog = None
        button_text = button_text or _("ACTION_OK")
        self.button_ok.setText(button_text)
        self.label_message.setText(message)
        self.line_edit_text.setPlaceholderText(placeholder)
        self.line_edit_text.setText(default_text)
        if validator:
            self.line_edit_text.setValidator(validator)
        if completion:
            completer = QCompleter(completion)
            completer.setCaseSensitivity(Qt.CaseInsensitive)
            completer.popup().setStyleSheet("border: 1px solid rgb(30, 78, 162);")
            self.line_edit_text.setCompleter(completer)
        self.button_ok.clicked.connect(self._on_button_clicked)
        self.setFocus()
        self.line_edit_text.setFocus() 
开发者ID:Scille,项目名称:parsec-cloud,代码行数:29,代码来源:custom_dialogs.py

示例6: setCompleter

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def setCompleter(self, completer):

        self.completer.setWidget(self)

        completer.setCompletionMode(QCompleter.PopupCompletion)
        completer.setCaseSensitivity(Qt.CaseInsensitive)
        self.completer = completer

        self.completer.insertText.connect(self.insertCompletion) 
开发者ID:CountryTk,项目名称:Hydra,代码行数:11,代码来源:Content.py

示例7: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def __init__(self, parent=None, show_linenumes=False, completer=True):
        super(JsCodeEditor, self).__init__(parent)

        self.setFont(get_os_monospace_font())

        self._show_linenums = show_linenumes

        keywords = []
        keywords_path = home_path() + 'keywords.json'
        if os.path.exists(keywords_path):
            with open(keywords_path, 'r') as f:
                try:
                    keywords = json.load(f)
                except:
                    pass

        if self._show_linenums:
            self.ui_line_numbers = JsCodeEditLineNums(self)
            self.blockCountChanged.connect(self.update_linenum_width)
            self.updateRequest.connect(self.update_line_numbers)
            self.update_linenum_width(0)

        self.setAutoFillBackground(True)
        # default distance is 80
        self.setTabStopDistance(self.fontMetrics().width('9999'))

        self.highlighter = JsHighlighter(keywords, parent=self.document())

        if completer:
            # code completion
            self.completer = DwarfCompleter(keywords)
            self.completer.setWidget(self)
            self.completer.setCompletionMode(QCompleter.PopupCompletion)
            self.completer.setCaseSensitivity(Qt.CaseInsensitive)
            self.completer.insertText.connect(self.insertCompletion)
        else:
            self.completer = None 
开发者ID:iGio90,项目名称:Dwarf,代码行数:39,代码来源:code_editor.py

示例8: __init__

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

        self.setFocusPolicy(Qt.StrongFocus)
        self.setEditable(True)

        # add a filter model to filter matching items
        self.pFilterModel = QSortFilterProxyModel(self)
        self.pFilterModel.setFilterCaseSensitivity(Qt.CaseInsensitive)
        self.pFilterModel.setSourceModel(self.model())

        # add a completer, which uses the filter model
        self.completer = QCompleter(self.pFilterModel, self)
        # always show all (filtered) completions
        self.completer.setCompletionMode(QCompleter.UnfilteredPopupCompletion)
        self.setCompleter(self.completer)

        # connect signals
        self.lineEdit().textEdited.connect(self.pFilterModel.setFilterFixedString)
        self.completer.activated.connect(self.on_completer_activated)

        # either fill the standard model of the combobox
        self.addItems(string_list)

        # or use another model
        # combo.setModel(QStringListModel(string_list))

    # on selection of an item from the completer, select the corresponding item from combobox 
开发者ID:adamerose,项目名称:pandasgui,代码行数:30,代码来源:extended_combobox.py

示例9: setAutocomplete

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import CaseInsensitive [as 别名]
def setAutocomplete(self):
        # Setando Auto complete
        self.completer = QCompleter(self)
        self.completer.setCaseSensitivity(Qt.CaseInsensitive)
        self.completer.setCompletionMode(QCompleter.PopupCompletion)
        self.model = QStringListModel(self)
        self.completer.setModel(self.model)
        self.tx_BuscaItem.setCompleter(self.completer)
        self.tx_NomeFantasia.setCompleter(self.completer)

    # AutoComplete Produtos 
开发者ID:andrersp,项目名称:controleEstoque,代码行数:13,代码来源:comercial.py


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