[PyQt] Re: PyQt menu and tool tip font

Thorsten Kampe thorsten at thorstenkampe.de
Sat Oct 25 19:00:21 BST 2008


* Mark Summerfield (Sat, 25 Oct 2008 09:01:39 +0100)
> On 2008-10-24, Thorsten Kampe wrote:
> > PyQt applications (like Sandbox[1]) on Linux have a horrible looking and
> > much too small font for the menus, tool tips and for the status bar -
> > while on Windows it looks totally normal (like all other applications).
> >
> > Where or how can I configure the font and the font size for the menus,
> > the tool tips and the status bar?!
> 
> I have encountered this problem in the past, but not in recent years
> with modern Linux distros.
> 
> In theory Qt GUI applications accept a -font command line option that
> QApplication takes care of. The docs say that this must be in XLFD
> format, e.g.,
>     ./prog.pyw -font -*-sans\ serif-*-r-*-*-16-*-*-*-*-*-*-*
> 
> This approach has the advantage that you don't need access to the
> source.

Whatever font or fontsize I enter there does not make a difference. Even 
when I enter non existing fonts, I don't get an error, so I wonder 
whether this is parsed at all.

Another person responded to me: "If you are using KDE, they should look 
just like KDE apps. If they don't, try using qtconfig.".

Yes, I'm using KDE but the fonts there look totally different (or at 
least the size - with a "miniature font" like in the PyQt applications 
it's hard to tell which font that actually is).

I've also tried changing the font with qtconfig. There I have DejaVu 
Sans 12 (which I probably set in the KDE Control Center). Changing that 
also doesn't make a difference with PyQt applications.


Thorsten



More information about the PyQt mailing list