Advertisement
tasuku

main.cpp

Apr 3rd, 2013
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <QtWidgets>
  2.  
  3. static void showMessage(const QString &message)
  4. {
  5.     QMessageBox::information(0, "メッセージ", message);
  6. }
  7.  
  8. int main(int argc, char **argv)
  9. {
  10.     QApplication app(argc, argv);
  11.  
  12.     QPushButton button("ボタン");
  13.     QObject::connect(&button, &QPushButton::clicked, []() {
  14.         showMessage("こんにちは");
  15.         showMessage("さようなら");
  16.     });
  17.     button.show();
  18.  
  19.     return app.exec();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement