def __init__(self, *args): QPlainTextEdit.__init__(self, *args) #self.setFrameStyle(QFrame.NoFrame) self.setFrameStyle(QFrame.NoFrame) self.highlight() #self.setLineWrapMode(QPlainTextEdit.NoWrap) self.cursorPositionChanged.connect(self.highlight)
def __init__(self, parent=None): QPlainTextEdit.__init__(self, parent) self.highlighter = SyntaxHighlighter(self) self.apply_settings() self.setMouseTracking(True) self.cursorPositionChanged.connect(self.highlight_cursor_line) self.blockCountChanged[int].connect(self.update_line_number_area_width) self.updateRequest.connect(self.update_line_number_area) self.line_number_area = LineNumbers(self)
def __init__(self, *args): QPlainTextEdit.__init__(self, *args) self.setMaximumWidth(655) font = QFont('') font.setFamily('Courier') font.setStyleHint(QFont.Monospace) font.setPointSize(10) self.setFont(font)
def __init__(self, parent=None): QPlainTextEdit.__init__(self, parent) self.current_cursor_line = None self.current_search_mark = None self.highlighter = SyntaxHighlighter(self) self.line_number_area = LineNumbers(self) self.apply_settings() self.setMouseTracking(True) self.cursorPositionChanged.connect(self.highlight_cursor_line) self.blockCountChanged[int].connect(self.update_line_number_area_width) self.updateRequest.connect(self.update_line_number_area) self.syntax = None
def __init__(self, *args): QPlainTextEdit.__init__(self, *args) # Default options to RightToleft options=QTextOption(); options = self.document().defaultTextOption(); options.setAlignment(Qt.AlignRight); options.setTextDirection(Qt.RightToLeft); self.document().setDefaultTextOption(options) # Default dictionary based on the current locale. self.dict = myspeller() # self.highlighter = Highlighter(self.document()) # self.highlighter.setDict(self.dict) self.pretxt=''
def __init__(self, *args): QPlainTextEdit.__init__(self, *args) # Default options to RightToleft options = QTextOption() options = self.document().defaultTextOption() options.setAlignment(Qt.AlignRight) options.setTextDirection(Qt.RightToLeft) self.document().setDefaultTextOption(options) # Default dictionary based on the current locale. self.dict = myspeller() # self.highlighter = Highlighter(self.document()) # self.highlighter.setDict(self.dict) self.pretxt = ''
def __init__(self, editor): """ The editor part """ QPlainTextEdit.__init__(self, editor) self.editor = editor self.setFrameStyle(QFrame.NoFrame) self.highlight() # Set a monospace font with a tab indent of 4 characters if os.name == "posix": self.font = QtGui.QFont("mono") else: self.font = QtGui.QFont("courier") self.setFont(self.font) self.setTabStopWidth(self.fontMetrics().width(unicode("1234"))) self.cursorPositionChanged.connect(self.highlight)
def __init__(self, parent=None): QPlainTextEdit.__init__(self, parent) self.selectionChanged.connect(self.selection_changed)