Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Transparency of metallic push-buttons
Qt 6.11 is out! See what's new in the release blog

Transparency of metallic push-buttons

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 771 Views 1 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.
  • D Offline
    D Offline
    dev123
    wrote on last edited by
    #1

    I found that the way to adjust the transparency of a push button is by

    button->setStyleSheet("background-color: rgba(230, 230, 230, 85%);" );
    

    where 85% would correspond to the desired transparency level. However, the rgb values change the color of the push-button, and I would like the buttons to still have the metallic grey appearance that that usually have. Can this be achieved (regular push-button, with transparency level adjusted only)?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Try this: "link":http://qt-project.org/doc/qt-5/qwidget.html#windowOpacity-prop, although I suspect it will not work.

      (Z(:^

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dev123
        wrote on last edited by
        #3

        It doesn't work.
        [quote author="sierdzio" date="1415268388"]Try this: "link":http://qt-project.org/doc/qt-5/qwidget.html#windowOpacity-prop, although I suspect it will not work.[/quote]

        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