I'm getting only integer values from QFontMetricsF::width() and QFontMetricsF.boundingRect().width().
I'm trying to use the width to draw a box with GraphicsView, but because of the integer coordinates, the box sometimes overlaps the text.
Here's the code I'm using:
Am I doing something wrong?Qt Code:
font.setPointSizeF(13.2524); std::cout << "width: " << fontsizer->width("string") << std::endl;To copy to clipboard, switch view to plain text mode
Bookmarks