PDA

View Full Version : trying to Use QcolorDialog to change symbol color on qwtplot



ahg
6th May 2010, 05:05
Hi,

I am trying to use QColordialog to get color of user's choice and then wants to change the color of a single point on Qwtplot to that color. How can I do it?

This is my first post here hoping to get some response.I would really appreciate your help.

Regards,

Uwe
6th May 2010, 07:30
I won't tell you how to use QColorDialog, but the Qwt related question is how to assign a color to a symbol of a point:

If your symbol is a point of a curve you can't change its color without changing the color of all other points of the curve ( beside you overload QwtPlotCurve::drawSymbols ). If it is a marker you can simply assign the color to the symbol. If you don't have too many colored points you can have your point as part of the curve + as a marker with a higher z value.

Uwe

ahg
6th May 2010, 14:09
Thanks Uwe for quick response(I appreciate this)... I am using Qwtplotcurve so I would see if its feasible for me to overload drawsymbols() function.

One more Question I have labels of the plot points in a Qtableview and I am looking to link them. Linking means whenever I select a label in Qtableview that point in the plot highlighted.is there a way I can do it.

Cheers,