PDA

View Full Version : Finidng the pixels for a character in QTextEdit



sukanyarn
27th October 2006, 09:19
Hi,
I am working on plain text editor using QTextEdit.
I need to allow user to change the tabwidth.
For that, QTextEdit has setTabStopWidth ( int ts ) function which sets the tab stop width in pixels.

I am giving an user interface to set the tab width in terms of spaces.
I want to know is there anyway to find out how many pixels correspond to one space.

wysota
27th October 2006, 09:56
Use QFontMetrics