I write this code ( QwtDial *d=new QwtDial(ui.label) I create a dial but there is no needle .I look end I see that drawNeedle method is protected .How can I draw a needle for qwtdial .Please can you write sample code
I write this code ( QwtDial *d=new QwtDial(ui.label) I create a dial but there is no needle .I look end I see that drawNeedle method is protected .How can I draw a needle for qwtdial .Please can you write sample code
You can set the needle using QwtDial::setNeedle() method.
I use setNeedle Method but this method want QwtDialNeedle object but QwtDialNeedle is abstract class.How can I do this .
I write this code but I take access violation error.
Qt Code:
ui.setupUi(this); d->setScaleArc(30,330); d->setScale(100,10,60); /*d->setOrigin(100);*/ d->setLineWidth(15); d->setValue(5); d->setWrapping(false); QwtDialNeedle * nd; d->setNeedle(nd);To copy to clipboard, switch view to plain text mode
Last edited by jpn; 3rd February 2008 at 16:01. Reason: missing [code] tags
Yes, because you pass an uninitialized pointer which points to some random memory garbage. Instantiate one of QwtDialNeedle non-abstract subclasses. From the docs you'll see which classes inherit QwtDialNeedle.
J-P Nurmi
yes I examine docs but I can not understand .if you have time , can you write an example.
Thanks
validator (3rd February 2008)
Thank you .I did
Last edited by validator; 3rd February 2008 at 23:41.
Bookmarks