mardi 21 avril 2015

How to set the width of the rectangle/area where text is drawn using QPainter::drawText() in QT?

I am quite new to 'QT' and api hooking . I have an application where i need to replace all it's original display text with specified target language text(in short-localization).After some research i came to know that QPainter::drawText() function is responsible to draw the text in the application.So i hooked it.Now i am able to change it's text to my language text.

But, issue is that when i forward my language text instead of it's original text,some characters of my text gets disappeared if my text width(i think i.e. number of characters)is greater than it's original text widht.

Here is screenshot for help:

![enter image description here][1]

red marked areas in the image.

So, please can anyone tell me how can i increase or decrease the width of the rectangle according to my text width.

please help me . . Thank you in advance.

Aucun commentaire:

Enregistrer un commentaire