[QScintilla] hotspot error on Linux
Matic Kukovec
matic.kukovec at pametnidom.si
Fri Aug 8 23:19:49 BST 2014
Hi guys,
I have a PyQt4 application with a QScintilla2 editor with Python3 and
the following function:
def create_hotspot(node_tab):
#Create the hotspot boundaries
hotspot_line = node_tab.lines()-2
hotspot_first_ch = node_tab.text(hotspot_line).index("-")
hotspot_length = node_tab.lineLength(hotspot_line)
hotspot_start =
node_tab.positionFromLineIndex(hotspot_line, hotspot_first_ch)
hotspot_end =
node_tab.positionFromLineIndex(hotspot_line, hotspot_length)
#Style the hotspot
node_tab.SendScintilla(PyQt4.Qsci.QsciScintillaBase.SCI_STYLESETHOTSPOT,
2, True)
node_tab.SendScintilla(PyQt4.Qsci.QsciScintillaBase.SCI_SETHOTSPOTACTIVEFORE,
True, 0xff0000)
node_tab.SendScintilla(PyQt4.Qsci.QsciScintillaBase.SCI_SETHOTSPOTACTIVEUNDERLINE,
True)
node_tab.SendScintilla(PyQt4.Qsci.QsciScintillaBase.SCI_STARTSTYLING,
hotspot_start, 31)
node_tab.SendScintilla(PyQt4.Qsci.QsciScintillaBase.SCI_SETSTYLING,
hotspot_end, 2) <- ERROR
On Windows this works great, but on Ubuntu this gives me the error at
the last line with the message:
Assertion [lengthStyle == 0 || (lengthStyle > 0 && lengthStyle +
position <= style.Length())]
failed at ../src/CellBuffer.cpp 426
Any ideas?
Matic
More information about the QScintilla
mailing list