0

I have searched high and low for this problem, but cannot find anything anywhere. I have Python Version 3.8.10 and PyQt5 version 5.15.10 running in a Virtual Environment on my Py4 with 8Gb Memory running Ubuntu 20.04.6 LTS (Focal Fossa) and the Mate Desktop.

My development environment is Gentoo Linux using the KDE Plasma Desktop with Python version 3.11.5 and PyQT5 version 5.15.10 in a Virtual Environment. I use Pycharm Pro and QT Designer to develop my scripts.

Some of the Widget Backgrounds will NOT show the correct color on the Raspberry Pi, but are fine on my Gentoo System.

Below is an example of tabs with the Correct and Incorrect color respectfully.

Correct Image

Incorrect Image

I have tried setting the color in QT Designer as well as like this in my script:

self.ui.tabWidget.setStyleSheet("background-color: {}; color: {};".format(gui_background_colour, gui_tab_font_colour))

Also tried background: {}; instead of background-color: {}; as suggested somewhere in a post, but it makes no difference.

Is it because the Raspberry Pi is using a GTK based Desktop and the Gentoo System is using the Qt Desktop?

Any ideas welcome.

1 Answer 1

0

OK ,I have answered my own question... I have finally setup a Pi running KDE Plasma Desktop, and the program renders the colors correctly, so that is the answer. However I would still like to know if is there a way to make a GTK Desktop render Qt correctly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.