Re: [Interest] Text editor's line numbers: misalignment

2012-08-22 Thread Sensei
On 8/22/12 10:09am, Diego Iastrubni wrote: > 1) use the same font for the line number as the text editor - > > or > > 2) set the hight of each line in the panel, as the hight of each line in > the editor. > Actually, that is what the code from Qt does. It wouldn't explain why the code works with

Re: [Interest] Text editor's line numbers: misalignment

2012-08-22 Thread Diego Iastrubni
On Wed, Aug 22, 2012 at 10:55 AM, Sensei wrote: > If I change the font to "Courier", or "Times", or "Andale Mono" or > Xcode's "Menlo", everything is OK, I've tested alignment with 10K lines. > > When I use "Monaco", the font I intended to use, lines numbers get > misaligned almost immediately. >

[Interest] Text editor's line numbers: misalignment

2012-08-22 Thread Sensei
Hi all, I've got a question about QPlainTextEdit, adding line numbers. I've been following the Qt example in http://qt-project.org/doc/qt-4.8/widgets-codeeditor.html, but I am experiencing a *very weird* problem. The only difference with the code above is in the constructor, as you can see in t