Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QtWidgets>
- static void showMessage(const QString &message)
- {
- QMessageBox::information(0, "メッセージ", message);
- }
- int main(int argc, char **argv)
- {
- QApplication app(argc, argv);
- QPushButton button("ボタン");
- QObject::connect(&button, &QPushButton::clicked, []() {
- showMessage("こんにちは");
- showMessage("さようなら");
- });
- button.show();
- return app.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement