Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Rendering issue of QPainter drawText method
HENIUS last edited by
I'm using QPainter and drawText method to draw text. Sometimes appears weird text rendering issue. I cannot find out any dependencies. It's interesting that only some letters are deformed. Have anyone ever noticed such problems before?
Look at inscription at the bottom of the picture.
Hi and welcome to devnet,
Are you using the same font for all drawing ? Is it the same string that use to draw both texts (the one that seem to be similar) ?
skozbial last edited by
Are you drawing this text in QWidget or QGraphicsItem? I suppose that you are reimplementing some protected function. Which one?
QWidget documentation: painting using a QPainter can only take place in a paintEvent() or a function called by a paintEvent()
You should consider whether to use dedicated classes for drawing text like QLabel or QGraphicsSimpleTextItem.