Try the following code in Qt 4.5 and Qt 4.6 on Windows XP:
The font has an odd-numbered height, while the rectangle has an even-numbered height, so the y-position of the text has to be rounded. In Qt 4.5 a bug caused the font height to be reported a pixel higher than what was actually true, thus giving us the effect of rounding the y-position up. When this bug was fixed in Qt 4.6, the text would move one pixel down as we now use the correct font height and round .5 numbers up.
We can go back to the old look and feel by rounding .5 numbers down in the text drawing code rather than up. This makes sense for text that has a heavy descent and light weight ascent, like most latin text, it's consistent with how old versions of Qt did it, and it's consistent with native look and feel.