QPushButton *button = new QPushButton("Click me!"); connect(button, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
QLabel *label = new QLabel("Hello, world!"); label->setAlignment(Qt::AlignCenter);
QSlider *slider = new QSlider(Qt::Horizontal); connect(slider, SIGNAL(valueChanged(int)), this, SLOT(onSliderValueChanged(int)));In all of these examples, the widgets are being created and manipulated using the Qt library.