spellcheck.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:bubblesub 作者: rr- 项目源码 文件源码
def _focus_match(self, idx, start, end):
        self._api.subs.selected_indexes = [idx]
        mispelt_word = self._api.subs.lines[idx].text[start:end]

        cursor = self._main_window.editor.center.text_edit.textCursor()
        cursor.setPosition(start)
        cursor.setPosition(end, QtGui.QTextCursor.KeepAnchor)
        self._main_window.editor.center.text_edit.setTextCursor(cursor)

        self._mispelt_text_edit.setText(mispelt_word)

        self._suggestions_list_view.model().clear()
        for suggestion in self._dictionary.suggest(mispelt_word):
            item = QtGui.QStandardItem(suggestion)
            item.setEditable(False)
            self._suggestions_list_view.model().appendRow(item)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号