Questions tagged [qscintilla]

QScintilla is a Qt port of Scintilla, a source code editing component.

Official documentation: https://riverbankcomputing.com/software/qscintilla/intro

98 questions
19
votes
2 answers

How can I make QScintilla auto-indent like SublimeText?

Consider the below mcve: import sys import textwrap from PyQt5.Qsci import QsciScintilla from PyQt5.Qt import * if __name__ == '__main__': app = QApplication(sys.argv) view = QsciScintilla() …
BPL
  • 9,632
  • 9
  • 59
  • 117
18
votes
1 answer

How to implement indentation based code folding in QScintilla?

The end goal here is to implement indentation based code folding in QScintilla similarly to the way SublimeText3 does. First of all, here's a little example of how you'd manually provide folding using QScintilla mechanisms: import sys from…
BPL
  • 9,632
  • 9
  • 59
  • 117
15
votes
2 answers

Pygments in QScintilla

Consider this mcve: import math import sys import textwrap import time from pathlib import Path from collections import defaultdict from PyQt5.Qsci import QsciLexerCustom, QsciScintilla from PyQt5.Qt import * from pygments import lexers, styles,…
BPL
  • 9,632
  • 9
  • 59
  • 117
15
votes
1 answer

How do you add folding to QsciLexerCustom subclass?

Consider this snippet: import sys import textwrap import re from PyQt5.Qt import * # noqa from PyQt5.Qsci import QsciScintilla from PyQt5.Qsci import QsciLexerCustom from lark import Lark, inline_args, Transformer class…
BPL
  • 9,632
  • 9
  • 59
  • 117
10
votes
2 answers

How to recognize that an application is running in dark theme on Linux?

I've developed an application which uses qscintilla as a text editor. I also implemented custom lexer to highlight language specific keywords. So far styles for highlighted keywords are hardcoded in mine application and it looks quite ok in the…
ibre5041
  • 4,903
  • 1
  • 20
  • 35
9
votes
4 answers

QScintilla based text editor in PyQt5 with clickable functions and variables

I am trying to make a simple texteditor with basic syntax highlighting, code completion and clickable functions & variables in PyQt5. My best hope to achieve this is using the QScintilla port for PyQt5. I have found the following QScintilla-based…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
8
votes
3 answers

ImportError: No module named Qsci while running ninja-ide

I am trying to install and run ninja-ide http://ninja-ide.org/home/ However when I try to run ninja-ide I am facing this error ImportError: No module named Qsci I have been trying to install ninja-ide whole night. I tried everything installing from…
Ishan
  • 3,303
  • 5
  • 29
  • 47
7
votes
3 answers

How to implement a comment feature that works with multiple selections in QScintilla?

I'm trying to implement a toggle comment feature in QScintilla that works with multiple selection. Unfortunately I don't know very well how to do it, so far I've come up with this code: import sys import re import math from PyQt5.Qt import * #…
BPL
  • 9,632
  • 9
  • 59
  • 117
6
votes
1 answer

How to use custom folding icons in QScintilla?

Consider this snippet: import sys from PyQt5.Qsci import QsciScintilla from PyQt5.Qt import * if __name__ == '__main__': app = QApplication(sys.argv) view = QsciScintilla() # http://www.scintilla.org/ScintillaDoc.html#Folding …
BPL
  • 9,632
  • 9
  • 59
  • 117
6
votes
1 answer

QScintilla in PySide

I like PySide, and have used it for a while now, but in the program I am working on at the moment, I need an advanced code editor. I have found QScintilla, but that is for PyQt. Is that compatible with PySide and if so, how would I go about using…
KFox
  • 1,166
  • 3
  • 10
  • 35
5
votes
1 answer

How to implement SublimeText fold-by-level feature in QScintilla

I'm trying to implement the fold_by_level SublimeText3 feature on a QScintilla component but I don't know very well how to do it, so far I've come up with this code: import sys import re import math from PyQt5.Qt import * # noqa from PyQt5.Qsci…
BPL
  • 9,632
  • 9
  • 59
  • 117
5
votes
3 answers

How do I compile QScintilla and Eric6 on Linux?

First I install QScintilla by following steps: 1: cd Qt4Qt5 qmake qscintilla.pro sudo make make install 2: cd ../designer-Qt4Qt5 qmake designer.pro sudo make sudo make install 3: cd ../Python python3 configure.py --pyqt=PyQt5 sudo make And here I…
Zieng
  • 453
  • 1
  • 7
  • 17
4
votes
1 answer

PyQt4 can't import Qsci

I'm installing PyQt4 on an old Linux system (CentOS 4.4) that can't be upgraded for hardware compatibility reasons. I've got Python 2.6, QT4 and SIP installed, and the installation of PyQt4 didn't give me any errors. When I run Python, this…
nmichaels
  • 49,466
  • 12
  • 107
  • 135
4
votes
1 answer

How to use the autocomplete feature with QScintilla?

I've found this demo autocompletion-using-pyqt4-and-qscintilla however, it would cause segment fault sometimes. Is this demo correct?
dameng
  • 508
  • 7
  • 12
4
votes
1 answer

QScintilla autocomplete on custom lexer in python

All, I'm using QScintilla to syntax-highlight and autocomplete my domain specific language (DSL). I wrote a custom lexer by re-implementing (QsciLexerCustom) and I'm trying to use the auto-completion. My problem is that the auto-completion doesn't…
1
2 3 4 5 6 7