Kelvin Salton Kelvin Salton - 3 days ago 5
C++ Question

How to put a bar above a QwtPlot graph?

Can I put a bar above a graph created with

QwtPlot
in Qt (C++)?

If yes, how can I do that? Any example?

The bar I want to put on the graph represents the day and night periods, and it looks like these:

enter image description here

Qwt 6.1.0

Qt 5.3.2

Thanks

Answer

I created the bar using a QFrame and painted it manually using the paintEvent function.

Comments