Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i *.h fil
- under private:
- Dialog *window;
- ***************************************************
- i *.cpp fil
- i konstr.
- window = new Dialog;
- connect(window->button, SIGNAL(clicked()), this, SLOT(startGame()));
- ***************************
- i startGame:
- window->setVisible(false);
- ***************************
- i keyPressed
- if (chosenNumber == randomNumber)
- {
- button->setStyleSheet("* { background-color: green }");
- window->setVisible(true);
- }
Add Comment
Please, Sign In to add comment