Qt Code:
  1. slider->setValue(45);
  2. connect(slider,SIGNAL(valueChanged(int)),lcd,SLOT(display(int)));
To copy to clipboard, switch view to plain text mode 

In fact, this is a possible way to set default values without triggering the slots those signals are connected to.