fork download
  1. // mainWindow.h
  2. #ifndef MAINWINDOW_H
  3. #define MAINWINDOW_H
  4. #include <QtWidgets>
  5. #include "cardsDisplay.h"
  6.  
  7. class MainWindow : QObject
  8. {
  9. Q_OBJECT
  10.  
  11. private:
  12. QWidget mainWindow;
  13. QWidget buttons;
  14. QWidget startButtons;
  15. CardsDisplay cards{CARDS_NUM};
  16. QPushButton* higherButton;
  17. QPushButton* lowerButton;
  18. QPushButton* newGameButton;
  19.  
  20. QLabel scoreLabel;
  21. QLabel status;
  22.  
  23. QBoxLayout* highLowLayout;
  24. QBoxLayout* mainLayout;
  25.  
  26. static const int CARDS_NUM;
  27. bool gameRunning = false;
  28. int score = 100;
  29. int * currentDeck = 0;
  30. int currentCard = 0;
  31.  
  32. void updateScore(int);
  33. void newMove(int n);
  34.  
  35. public:
  36. MainWindow();
  37. ~MainWindow();
  38. QWidget* getWidget(){ return &mainWindow; }
  39.  
  40. public slots:
  41. void newGame();
  42. void higher();
  43. void lower();
  44.  
  45. };
  46. #endif
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:21: fatal error: QtWidgets: No such file or directory
 #include <QtWidgets>
                     ^
compilation terminated.
stdout
Standard output is empty