[PyQt] QScintilla problem take 2 - style sheets

Barry Scott barry at barrys-emacs.org
Mon Sep 2 16:14:09 BST 2019


Phil,

Are you able to comment on this problem?

Is there something more I need to change in my code or is this a problem in the QScintilla code?

Barry


> On 25 Aug 2019, at 17:29, Barry Scott <barry at barrys-emacs.org> wrote:
> 
> 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 at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list