[PySide] trouble with special characters in widget.setToolTip()

Frank Rueter | OHUfx frank at ohufx.com
Fri Mar 4 06:20:53 CET 2016


Thanks for clarifying Stephan.
I still don't feel 100% on the encoding issue but certainly a lot less 
ignorant than before :)

Cheers,
frank

On 4/03/16 2:20 am, Stephan Deibel wrote:
> Frank Rueter | OHUfx wrote:
>> Hm, I'm not having much luck. Apparently my tooltip and default font 
>> is Lucida Grande when running the code inside Wing, which should be 
>> able to display quotation marks. I tried changing the font to 
>> Verdana, as that is what my host application is using (where I get 
>> the corrcet characters), but to no avail.
>> I tried using QtGui.QToolTip.setFont() and QApplication().setFont() 
>> but I was still left with the wrong characters.
>>
>> Any more ideas?
>
> In Wing, if you are doing this in a shell, the encoding options on the 
> Debugger > I/O preferences page may be relevant.  Also, if the strings 
> are in a source file, use a coding comment at the top of the Python 
> file (like "#coding:utf-8"; Wing converts the file if you change or 
> add this) and be sure you're sending correctly encoded strings or 
> unicode strings to PySide.  The font can matter if it's missing the 
> necessary unicode glyphs but that probably isn't the issue in this case.
>
> - Stephan
>

-- 
ohufxLogo 50x50 <http://www.ohufx.com> 	*vfx compositing 
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation 
and consulting <http://ohufx.com/index.php/vfx-customising>* *

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160304/930b08dc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ohufxLogo_50x50.png
Type: image/png
Size: 2666 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160304/930b08dc/attachment.png>


More information about the PySide mailing list