[PyQt] PYQt defaults to fonts looking bold on macOS but C++ Qt does not

Barry Scott barry at barrys-emacs.org
Wed Jul 6 12:48:35 BST 2016


> On 6 Jul 2016, at 12:16, Florian Bruhin <me at the-compiler.org> wrote:
> 
> * Barry Scott <barry at barrys-emacs.org> [2016-07-06 12:08:02 +0100]:
>> 
>>> On 6 Jul 2016, at 12:04, Phil Thompson <phil at riverbankcomputing.com> wrote:
>>> 
>>> On 6 Jul 2016, at 11:55 am, Barry Scott <barry at barrys-emacs.org> wrote:
>>>> 
>>>>> 
>>>>> On 6 Jul 2016, at 11:50, Phil Thompson <phil at riverbankcomputing.com> wrote:
>>>>> 
>>>>> On 6 Jul 2016, at 11:26 am, Barry Scott <barry at barrys-emacs.org> wrote:
>>>>>> 
>>>>>> Compare the windows snapshots taken for a PyQt5 app and a C++ Qt5 app
>>>>>> that use a QLabel control.
>>>>>> 
>>>>>> http://www.barrys-emacs.org/export/Qt5.png
>>>>>> 
>>>>>> http://www.barrys-emacs.org/export/PyQt5.png
>>>>>> 
>>>>>> You can see that the text in PyQt5 looks like it is bold compared to the
>>>>>> Qt5 version.
>>>>>> 
>>>>>> On Fedora I see that same text for Qt5 and PyQT5.
>>>>>> 
>>>>>> Please fix this problem in PyQt5.
>>>>>> 
>>>>>> The source code I used is in:
>>>>>> 
>>>>>> http://barrys-emacs.org/export/font-example.tar.gz
>>>>>> 
>>>>>> Note: This bug affects all text, list, tables, line edit everything.
>>>>> 
>>>>> ...on your system. It works fine for me. PyQt does nothing with fonts.
>>>> 
>>>> Oh. I have not knowingly done anything that would cause this.
>>>> 
>>>> If I wanted to globally change the font used by PyQt5 how would I do it?
>>>> Is there a config file that PyQt5 will read that Qt will not?
>>> 
>>> No.
>> 
>> I guess I’m about to learn how dtrace works to find the difference.
> 
> Are you sure you're using the exact same Qt version via PyQt?

Qt.PYQT_VERSION_STR 5.6
QtCore.QT_VERSION_STR 5.6.1

And I use Qt 5.6.1 for the C++ project.

I did build and install PyQt from source against Qt 5.6.1.

Barry

> Florian
> 
> -- 
> http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
>   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
>         I love long mails! | http://email.is-not-s.ms/
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list