Python PyQt5.QtCore.Qt.CaseInsensitive() Examples

The following are 9 code examples of PyQt5.QtCore.Qt.CaseInsensitive(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module PyQt5.QtCore.Qt , or try the search function .
Example #1
Source File: add_item_name.py    From QualCoder with MIT License 7 votes vote down vote up
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); 
Example #2
Source File: listcategory.py    From qutebrowser with GNU General Public License v3.0 5 votes vote down vote up
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) 
Example #3
Source File: proxymodel.py    From dunya-desktop with GNU General Public License v3.0 5 votes vote down vote up
def filter_table(self, text):
        reg_exp = QRegExp(text, Qt.CaseInsensitive)
        self.setFilterRegExp(reg_exp) 
Example #4
Source File: workspace_sharing_widget.py    From parsec-cloud with GNU Affero General Public License v3.0 5 votes vote down vote up
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() 
Example #5
Source File: custom_dialogs.py    From parsec-cloud with GNU Affero General Public License v3.0 5 votes vote down vote up
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() 
Example #6
Source File: Content.py    From Hydra with GNU General Public License v3.0 5 votes vote down vote up
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) 
Example #7
Source File: code_editor.py    From Dwarf with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #8
Source File: extended_combobox.py    From pandasgui with MIT License 5 votes vote down vote up
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 
Example #9
Source File: comercial.py    From controleEstoque with MIT License 5 votes vote down vote up
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