Hey,
The legend item list is sorted, but the key is not the text but the pointer to the widget:
Qt Code:
To copy to clipboard, switch view to plain text mode
So answer to question 2 is: list doesn't change the order, it's just ordered by something else that you'd expect.
I don't know where you got the 'ser_no', but I couldn't find it anywhere in qwt 6.0.1 source I have.
To answer your original question:
Create additional map of your curves in format: QMap< QwtPlotItem*, int >, where pointer is your curve, and int is its ID (may be index in other list you have or anything else that you find useful);
this way in your setConfig() you can get ID of each curve from the pointer you're getting there.
Now I have a question:
Why do you need it for?
There may be something wrong with your thinking here.
Bookmarks