Legend checked index always 0
Brought to you by:
rathmann
From: Kuldeep S. D. <kul...@gm...> - 2014-07-11 15:13:59
|
Hello Qwt guys. i did a little test: example mutated: cpuplot changes: cpuplot.h (added third parameter "int" to slot) void legendChecked( const QVariant &, bool on, int ); cpuplot.cpp (added "int" as per header) connect( legend, SIGNAL( checked( const QVariant &, bool, int ) ), SLOT( legendChecked( const QVariant &, bool, int ) ) ); (added the "int" parameter and print it to commandline) void CpuPlot::legendChecked( const QVariant &itemInfo, bool on, int index ) { qDebug() << index; QwtPlotItem *plotItem = infoToItem( itemInfo ); if ( plotItem ) showCurve( plotItem, on ); } what ever legend legendLabel i click, it always print "0" instead of index that was expected. (should also be same for clicked()) why? -- *Kuldeep Singh Dhaka* +91-8791676237 Programmer, Open Source, Embedded System, Entrepreneur, System Administrator, Animal Lover, Web Developer, Learner. My GnuPG Public Key <http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x23816C5609DC7E26> Fork Me <http://github.com/kuldeepdhaka> Bitcoins Accepted. |