Styling a specific button in Qt Installer
Unsolved
Installation and Deployment
-
wrote on 18 Jun 2024, 14:14 last edited by
So the way to style buttons is using the style.qss. And in my case I do it like this
QPushButton { background-color: rgb(169, 143, 79); color: white; border-radius: 4px; padding: 5.5px 26px; font-size: 8px; }
Which is fine. But I can't manage to change a specific button, for example the "Next" button. How could you have one style for all buttons and another for the "Next" button?
-
Hi,
I would check if the button has an object name associated to it, you would then be able to use it as a selector for the stylesheet. See here.
-
wrote on 19 Jun 2024, 09:18 last edited by Marko Stanke
@SGaist I tried already a few variations of
QPushButton#okButton { color: gray }
like
QPushButton#nextButton { color: gray } QPushButton#NextButton { color: gray } QPushButton#continueButton { color: gray }
But the docs do not specify how those built-in buttons in the Qt Installer are named.
-
You should rather check the code of the installer framework, it will be faster.
1/4