Kelvin Salton Kelvin Salton - 1 year ago 106
C++ Question

How to put a bar above a QwtPlot graph?

Can I put a bar above a graph created with

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


Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download