@wysota, It looks like the NightCharts is designed to be created every time inside the QPaintEvent, having it as class member will not work. (meaning it is not reusable, no means to reset or clear the data in pie, so no way to write new data, only way out is create a new instance)Originally Posted by wysota
@rawfool
The problem you see is due to a bug in NightCharts. A member variable double Nightcharts::palpha; is not initialized in the ctor, just initializing it to 0 in the ctor of Nightcharts will fix the problem (unless there are other problems). Good Luck, and also report the bug to the author.
And reason the NightCharts is creatd every time in the QpaintEvent is creating this random behaviour, as each time the NightCharts object is created double Nightcharts::palpha; takes a random value and a undefined drawing of the pie chart happens
Bookmarks