Guest User

Untitled

a guest
Jul 23rd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #include <QApplication>
  2. #include <QWidget>
  3. #include <QVBoxLayout>
  4. #include <QPushButton>
  5. #include "breakout.h"
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. QApplication app(argc, argv);
  10. Breakout a;
  11. // QApplication::setFont("Times", 18, QFont::Bold);
  12. QWidget *window = new QWidget;
  13. window->resize(640,480);
  14. window->setMaximumSize(640,480);
  15. window->setMinimumSize(640,480);
  16. QVBoxLayout *layout = new QVBoxLayout;
  17.  
  18.  
  19. QPushButton onePlayer("Start");
  20. onePlayer.resize(400,50);
  21. QPushButton authors("Autorzy");
  22. QPushButton quit("Quit");
  23.  
  24. layout->addWidget(&onePlayer);
  25. layout->addWidget(&authors);
  26. layout->addWidget(&quit);
  27.  
  28. QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );
  29. QObject::connect( &onePlayer, SIGNAL(clicked()), &a, SLOT(a.show()) );
  30. window->setLayout(layout);
  31. window->show();
  32. //a.show();
  33. return app.exec();
  34. }
Add Comment
Please, Sign In to add comment