Article 58S81 Background color of QPushButton, in Python; Fedora vs. Ubuntu

Background color of QPushButton, in Python; Fedora vs. Ubuntu

by
RockDoctor
from LinuxQuestions.org on (#58S81)
Wondering what I might be dong wrong. I'm running Fedora 32 and 33, and Ubuntu 20.04 and 20.10, all updated. The code below properly colors the buttons under Fedora, but not under Ubuntu.
Code:from PyQt5.QtWidgets import (QTableWidgetItem, QLabel, QLineEdit,
QVBoxLayout, QWidget, QPushButton,QGridLayout, QTableWidget,
QFileDialog, QApplication, QHBoxLayout, QButtonGroup)
from PyQt5.QtCore import Qt
...
for idx, img in enumerate(["", "", "", ""]):
btn = QPushButton(img, self)
btn.setMaximumWidth(20)
btn.setStyleSheet("background-color: aqua")
self.xlt_grp.addButton(btn, idx+1)
hbox.addWidget(btn)Coloring the background QTextEdit works properly in all cases.latest?d=yIl2AUoC8zA latest?i=TQsZc3TIJSo:3p9qH1gosLo:F7zBnMy latest?i=TQsZc3TIJSo:3p9qH1gosLo:V_sGLiP latest?d=qj6IDK7rITs latest?i=TQsZc3TIJSo:3p9qH1gosLo:gIN9vFwTQsZc3TIJSo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments