Без названия

Run Settings
LanguageC++
Language Version
Run Command
#include <QApplication> #include <QWidget> #include <QApplication> #include <QHBoxLayout> #include <QVBoxLayout> #include <QSlider> #include <QSpinBox> #include <QPushButton> #include <QTextCodec> int main(int argc, char *argv[]) #define RUS(str) codec->toUnicode(str) { QApplication app(argc, argv); QWidget * hbox = new QWidget; hbox->setWindowTitle("Введите ваш возраст"); QSpinBox *spinBox = new QSpinBox(hbox); QSlider *slider = new QSlider(Qt::Horizontal, hbox); spinBox->setRange(0, 130); slider->setRange(0, 130); spinBox->setValue(35); slider->setValue(35); QPushButton *btn = new QPushButton("Завершение", hbox); QHBoxLayout *layout = new QHBoxLayout; layout->setContentsMargins(5, 5, 5, 5); layout->setSpacing(5); hbox->setLayout(layout); layout->addWidget(spinBox); layout->addWidget(slider); layout->addWidget(btn); QObject::connect(spinBox,SIGNAL(valueChanged(int)), slider, SLOT(setValue(int))); QObject::connect(slider, SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int))); QObject::connect(btn, SIGNAL(clicked(bool)), hbox, SLOT(close())); hbox->show(); return app.exec(); }
Editor Settings
Theme
Key bindings
Full width
Lines