Reputation: 509
I am creating a custom slider class using QAbstractSlider
as base class. In the main function I have tried connect(spinBox, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int)))
but it is not working.
Upvotes: 0
Views: 555
Reputation: 12321
The connection should work.
Make sure that you have used the Q_OBJECT macro in your class definition. Also in the main.cpp do the following:
Add the following include:
#include <QErrorMessage>
and add the following line of code
QErrorMessage::qtHandler();
If there is any problem with Singal /Slot connections a qt dialog will popup.
Upvotes: 2