Last active
September 28, 2025 10:32
-
-
Save ssendeavour/5261469 to your computer and use it in GitHub Desktop.
Gt QHBoxLayout and slot example C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <QtGui/QApplication> | |
| #include <QtGui/QPushButton> | |
| #include <QtGui/QWidget> | |
| #include <QtGui/QSpinBox> | |
| #include <QtGui/QSlider> | |
| #include <QtGui/QHBoxLayout> | |
| int main(int argc, char *argv[]) | |
| { | |
| QApplication a(argc, argv); | |
| QWidget *window = new QWidget; | |
| window->setWindowTitle(("&Enter your age")); | |
| QSpinBox *spinBox = new QSpinBox; | |
| QSlider *slider = new QSlider(Qt::Horizontal); | |
| spinBox->setRange(0,130); | |
| slider->setRange(0,130); | |
| QObject::connect(slider,SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int))); | |
| QObject::connect(spinBox,SIGNAL(valueChanged(int)), slider, SLOT(setValue(int))); | |
| spinBox->setValue(35); | |
| QHBoxLayout *layout = new QHBoxLayout; | |
| layout->addWidget(spinBox); | |
| layout->addWidget(slider); | |
| window->setLayout(layout); | |
| window->show(); | |
| return a.exec(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ich schreibe aus Leipzig. Meine Schwester erwähnte Progressive-Jackpots; die Seite erklärte Triggerbedingungen und Mindestlinien verständlich, deshalb startete ich mit kleinen Einsätzen. Die Erklärungen zu Risiko und möglichen Auszahlungen gaben mir ein realistischeres Bild. https://glitz-bets.de/ Nach mehreren Versuchen traf ich einen Gewinn, der meine Verluste ausglich und ein kleines Plus brachte. Auszahlung erfolgte planmäßig und die Limits waren leicht anpassbar.