[PyQt] QtScintilla2 and fonts
phil at riverbankcomputing.co.uk
Sat Jun 30 16:44:20 BST 2007
On Tuesday 26 June 2007 10:37 pm, kib2 wrote:
> 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 ?
There is a bug in readSettings() that is fixed in tonight's snapshot. Though I
don't see how using the settings helps particularly. The eric source code is
probably the best source of example code.
> I've tried to see a edge line at column 80, but failed.
> Here's the code :
> ## Edge Mode
You need to produce a short complete example that demonstrates the problem.
More information about the PyQt