Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Styling a specific button in Qt Installer
Forum Updated to NodeBB v4.3 + New Features

Styling a specific button in Qt Installer

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 390 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Marko StankeM Offline
    Marko StankeM Offline
    Marko Stanke
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Marko StankeM Offline
        Marko StankeM Offline
        Marko Stanke
        wrote on last edited by Marko Stanke
        #3

        @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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You should rather check the code of the installer framework, it will be faster.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved