ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

17 July 2024
2024-07-17×
17 July 2024
A
Ссылка
click to show
Hey everyone, I'm having this very weird issue while trying to use Qt Stylesheets. So basically I have some QPushButtons whose color I want to set. I am using a stylesheet but only one of the buttons is colored. Moreover, I changed the rgb value for the button which gets colored and yet it is still shows up with the same colour it did as first and doesn't update at all. This is what my code and rendered stylesheet look like: https://bpa.st/ERXA And, this is what my window looks: https://imgur.com/a/SQeW7k6
(218, 214, 87) (218, 214, 87) (21, 229, 149) (161, 185, 126) (161, 185, 126) (51, 209, 203)
A
it's just rgb values like this
Ë
Why do you use Template? You just read all the data directly right? The Qss doesn't look like there is anything to be replaced?
The setObjectName has to happen on the proper objects
it's probably a typo
should be self.colouredButton1.setObjectName("colouredButton1") ... self.colouredButton2.setObjectName("colouredButton2")
Ë
For simple replacement you can also use Python built-in % notation
Ë
something: ((1, 2, 3))
Ë
You can also use .format but that would need you to make double {{ for every literal {
Ë
I'm sticking with % notation as it simply doesn't break CSS highlighting :D
Calendar: July 2024
MoTuWeThFrSaSu1235456678910111121311415163172618319202122232412526272829630231
Archive by month
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog