Invert colors of B/W image

  • Hello,

    I am using stylesheet for the image (black/white image):
    img: url(:/resource/img.png);
    Is it possible to invert color of image attached to QLable in stylesheet (or any other methods ) ?


  • Hi
    I never tryed anything like that, but a quick look at the docs shows maybe this can help ?

  • Lifetime Qt Champion


    To add to @johngod why use a style sheet to put an image in a QLabel ?

  • @SGaist

    Do you mean that pixmap is better for image ?


  • Qt Champions 2016

    The QLabel support setting the image directly.
    Even its called setPixmap it does take any image supported by Qt.
    You can even browse the resource and browse to it , directly in Designer.

Log in to reply