[PyQt] QtScintilla2 and fonts

kib2 kib2 at free.fr
Tue Jun 26 22:37:31 BST 2007


Phil Thompson a écrit :
> On Tuesday 26 June 2007 1:38 pm, kib2 wrote:
>> Hi,
>>
>> I'm trying to play with QtScintilla2 and something is going wrong :
>>
>> editor = QsciScintilla()
>> font = QtGui.QFont()
>> font.setFamily("Consolas")
>> font.setPointSize(10)
>> editor.setFont(font)
>> editor.setMarginsFont(font)
>>
>> the problem here is that the Margin font is set correctly, but not the
>> editor one.
>>
>> Have you got any hint please ? Thanks.
> 
> Works for me.
> 
> Phil
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 
Hi Phil,

you are right, but I badly expressed myself.
In fact, I wanted all the different styles to use "Consolas" fonts.
So I've read the QScintilla docs and found the save/writeSettings method
from a lexer, but never managed to get it work correctly.

Can you please give me a sample ?

I've tried to see a edge line at column 80, but failed.
Here's the code :

## Edge Mode
editor.EdgeMode(QsciScintilla.EdgeLine)
editor.setEdgeColumn(80)
editor.setEdgeColor(QtGui.QColor("#FF0000"))


Cheers,

Kib.






More information about the PyQt mailing list