QwtDial and QwtKnob not sending position information
I am new to Qt and Qwt so I apologize in advance for the simplicity of my question. I am using Qt 5
I created a QwtDial and QwtKnob and wanted to connect a signal to see the value change. I also created a QDial and did the same thing. the signals work correctly when I move the Qdial.
d_knob = new QwtKnob;
d_knob->setScale(0,20);
ui->knobVerticalLayout->addWidget(d_knob);
connect(d_knob, SIGNAL(d_knob->sliderMoved(double)), this, SLOT(testQwtDialSliderMoved(double)));
when I run I get the message:
QObject::connect: No such signal QwtKnob::d_knob->sliderMoved(double) in ..\qwt_test\mainwindow.cpp:51
QObject::connect: (receiver name: 'MainWindow')
I am sure I am missing something very simple. I am not getting a signal sent from QwtDial or QwtKnow but I am getting the signal from QDial.
in my header file:
public Q_SLOTS:
void testQDialSliderMoved(int value);
void testQwtDialSliderMoved(double value);
any help would be appreciated.
Re: QwtDial and QwtKnob not sending position information
Wrong syntax for the connect() statement. Should be:
Code:
connect(d_knob, SIGNAL(sliderMoved(double)), this, SLOT(testQwtDialSliderMoved(double)));
and be sure to define "testQwtDialSliderMoved()" as a slot in your MainWindow class.
Please use CODE tags when posting code. Click "Go advanced" and then the "#" icon to insert the open/close tag pair. Paste your code between them.
Re: QwtDial and QwtKnob not sending position information
all worked perfectly. operator error. Thank you very much. Love Qt awesome!!!