[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] QScintilla problem take 2 - style sheets
From: Barry Scott <barry () barrys-emacs ! org>
Date: 2019-08-25 16:29:44
Message-ID: 4D7B1BCD-A481-4D12-B56E-E940F900FDFD () barrys-emacs ! org
[Download RAW message or body]
I have changed my code to use the high level setFont() call and found that worked in some cases.
But If I set styles on QApplication then QScintilla does no use the family from setFont, only the point size.
I use setStyleSheet() to customise the UI font use in the larger app.
The attached code shows this issue - it was tested on macOS and I think uses fonts that are always
installed on macOS to show the problem. However this issue is also present on windows builds.
This looks like a regression going from PyQT 5.12 to PyQt 5.13. Or is it a deliberate change?
I tested with 2 venv's setup like this:
#!/bin/bash
echo "Info: setup PyQt 5.13 with QSci"
python3.7 -m venv create qsci-5-13
qsci-5-13/bin/pip install PyQt5 QScintilla xml-preferences
echo "Info: setup PyQt 5.12 with QSci"
python3.7 -m venv create qsci-5-12
qsci-5-12/bin/pip install PyQt5==5.12.2 QScintilla==2.11.1 xml-preferences
Then run the attached code against each venv with and without the --style option.
The follow 3 runs show identical windows contents.
qsci-5-12/bin/python qsci_bug.py
qsci-5-12/bin/python qsci_bug.py --style
qsci-5-13/bin/python qsci_bug.py
But this run does not use the intended font.
qsci-5-13/bin/python qsci_bug.py --style
Text is draw with different fonts.
Barry
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic