parent
needs to be aQWidget*
, just as the error states- Slots work like regular member functions. You should probably store an exact
double
as a member and set the underlying slider to the appropriate integer equivalent. Remember to only sendvalueChanged
signals if the value really changes.
Furthermore you should probably inherit from QWidget
instead and have a QSlider
as a child, as you do not want users of your class to change the integer range of your internal slider.