Picard 2.0 / PyQt5 display issue

Tags: #<Tag:0x00007f351be4f488>


Just ironing out a few minor bugs with my Classical Extras plugin for Picard 2.0.
Among these is a slight issue with the displaying of the options page. This was developed in Qt Creator and should be agnostic as regards PyQt4 or PyQt5. I used pyuic5 to create the PyQt5 version. Functionally it works as before, but the display is messed up slightly - the checkboxes, radio buttons, tooltips and tabs all take the background colour rather than white/grey. I’ve reviewed the generate Python code and can see no reason for this. I’m wondering if it is a Picard 2.0 issue or a PyQt5 issue. See images below - the first image is how it looks now and the second is how it looked in PyQt4:


Just bumping this in case anyone (@samj1912?) has any ideas. I have investigated further by running the dialog in standalone mode under PyCharm with PyQt5 and it displays correctly (i.e as it appeared in Picard 1.4.2), so I am wondering if there is any way in which Picard can be interfering with the display?


FIXED - or at least a work-round!
I still don’t know what causes Picard to display differently from the standalone Python environment (all on W10 machine), but in case anyone else is mad enough to do colourful plugin options pages, here is the fix:

Do not use stylesheet background colours in Qt.
Instead set the window colour in the palette and enable “autoFillBackground”.