Sunday, May 3, 2009

find out the size in pixels (width, height) of a QString

Very useful when trying to determine the width or height of a string in case of control position.


QFontMetrics fm( someFont);
int w = fm.width( "String");
int h = fm.height();

0 תגובות:

Post a Comment

 
Home | About | Link | Link
Simple Proff Blogger Template Created By Herro | Inspiring By Busy Bee Woo Themes