PDA

View Full Version : Why fonts in Qt are appearing blurry or pixelated?



Abhay_Salvi
11th May 2020, 14:13
All my fonts are appearing pixelated, so I used AntiAliasing but it isn't helping out. As you can see the pixelated font in the image itself:

13438

This is the code I am using:



butt1 = QtWidgets.QLabel("""Scrappr""")
font = QtGui.QFont()
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
font.setPixelSize(22)
font.setFamily('Segoe UI Bold')
butt1.setFont(QtGui.QFont(font))


Edit 1: I also tried different combinations of ClearType text but It didn't work out, because for my PC, by default all the text appears good on windows and chrome but with Qt, it becomes pixelated. So it's probably not a windows problem...

The problem is something with Qt itself.

ChristianEhrlicher
11th May 2020, 20:04
Why do you double post?
https://www.qtcentre.org/threads/70993-Why-fonts-in-Qt-are-appearing-blurry-or-pixelated

Abhay_Salvi
12th May 2020, 04:01
Yeah, I did that by mistake. But I don't know how to delete the post. I searched on google but nothing helped me. I want to delete the post from the Newbie section.
Thanks...