Tuesday, 17 September 2013

Using custom font in QTabWidget

Using custom font in QTabWidget

I want to use custom font for my App, so:
I have installed PT Sans on my Windows 7
Used that font in stylesheet (I do not work with fonts from code - only in
stylesheets)

QTabBar::tab{
min-width: 64px;
min-height: 21px;
border-image: url(:images/tab_unselected.png);
border-top: 3px;
border-bottom: 5px;
border-right: 4px;
border-left: 4px;
color: rgb(44, 44, 44);
font-size: 12px;
font-family: "PT Sans";
margin-top: 0px;
margin-bottom: 0px;
}
For some reason, the letter spacing is wrong. I tried different font-size
in stylesheets but the result is the same. Please see pictures attached.
'I mage' is in focus and has strange gap after "I"

'Audio' is in focus and there is no gap after "I"
Actually, there are a lot of such places over UI so I don't think this is
something specific to QTabWidget only.
I hope someone has already faced such issue and can give me a clue on what
the heck is going on here.
Thanks a lot!

No comments:

Post a Comment