If I have a QLabel with a pixmap, and the QLabel is disabled, the pixmap will be automatically converted to grayscale.
Is there a way to avoid it?
I have a large GUI with lots of elements. I want to set it to disabled, but have one image inside it still showing some color.
The QLabel in question is itself enabled, but it does not matter, as the parent widget is disabled.
I tried removing the color effects with a stylesheet, but it did not work:
setStyleSheet("QLabel { color: none; } QLabel:disabled { background: none; color: none; opacity: 1.0; }");
The following don’t work either in the stylesheet:
color: none !important;
color: unset !important;
I also tried removing the element’s GraphicsEffect, but that did not work either.
The element in question is deeply embedded in a complex and resizable layout, so having it outside the parent widget and floating over it would be extremely complicated.
4