Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.8.2, 4.8.3, 4.8.4, 4.8.5
-
None
-
Windows 7 & Linux with Python 3 & PySide 1.1.1 on Linux and 1.2.2 on Windows.
Description
When I start up my PySide application I call this method:
def changeBackground(self, bg):
palette = self.lineEdit.palette()
palette.setBrush(QPalette.Base, QBrush(bg))
self.lineEdit.setPalette(palette)
palette = self.textEdit.palette()
palette.setBrush(QPalette.Base, QBrush(bg))
palette.setBrush(QPalette.Window, QBrush(bg))
self.textEdit.setPalette(palette)
bg is a QColor or a QPixmap; self.lineEdit is a QLineEdit and self.textEdit is a QTextEdit.
This works the first time I call it.
But the second and subsequent times I call it, it works correctly for the QLineEdit; but has no effect on the QTextEdit. I have tried setting autofillbackground on and off and it has no effect.