Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include "mainwindow.h"
  2. #include <QApplication>
  3. #include <QLCDNumber>
  4. #include <QSlider>
  5. #include <QVBoxLayout>
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. QApplication app(argc, argv);
  10. QWidget window;
  11. QLCDNumber *lcd = new QLCDNumber();
  12. QSlider * qs = new QSlider(Qt::Horizontal);
  13. QVBoxLayout * vlayout = new QVBoxLayout();
  14. vlayout->addWidget(lcd);
  15. vlayout->addWidget(qs);
  16. lcd->display(5);
  17.  
  18. window.setLayout(vlayout);
  19. window.show();
  20.  
  21. return app.exec();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement