c++qtuser-interfaceqt-creatorqwt

Change QwtPlot background while using dark mode gui?


When I disable dark mode which is provided via BreezeStyleSheet:

https://github.com/Alexhuszagh/BreezeStyleSheets

it works (I can change background with set canvas palette to whatever I want and then attach it to QwtPlot). But when I use style sheet it seems almost impossible to set it.

Does anybody have some ideas on how to fix this issue?


Solution

  • For custom widget based on QwtPlot it will be:

    this->canvas()->setStyleSheet("background-color: black;border: none;");
    
    

    in constructor.