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. QToolButton Icon
Qt 6.11 is out! See what's new in the release blog

QToolButton Icon

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 181 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by
    #1

    I set an Icon (bmp file) on a QToolButton. That was fine except the icon was built for use with Windows code which has a "convention" that a specific magenta/pink colour is interpreted as transparent. So when I use it in Qt I see:

    d76b364b-15cb-4331-b046-31fd5c1c1287-image.png

    How do get parts of the icon to be transparent in Qt? I'm happy to re-design the icon so it isn't a .bmp file

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Use a png with a proper alpha channel.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      • Login

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