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. Unable to grey out QPushButton with image, when disable
Forum Updated to NodeBB v4.3 + New Features

Unable to grey out QPushButton with image, when disable

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 273 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.
  • T Offline
    T Offline
    ThomasBr
    wrote on last edited by
    #1

    Hello,

    I would like to grey out a image on QPushButton (only the image, not the background) when i disable it.
    If i understand well, it's a base functionnality (it should grey out image when disable) but when i disable a button the color don't change (the button is well disable i can't click on it).

    I don't want to create a special disable icon because i would like to save the current state ex:

    default image : grey
    clicked image : blue
    disable : more grey out
    if click before and then disable : blue grey out.

    I use QT5.15.2 for C++ (on a older version of Qt it's work well).

    What i am missing ? Thanks for your help.

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

      Hi and welcome to devnet,

      Can you show a picture of the working version and the one you have now ?

      Since it used to work, there might be a regression.

      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