Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QtWidgets>
- int main(int argc, char **argv)
- {
- QApplication app(argc, argv);
- QToolButton button;
- QAction action(&button);
- action.setShortcut(QKeySequence("X"));
- button.addAction(&action);
- QObject::connect(&action, &QAction::triggered, [=]() {
- qDebug() << "test";
- });
- button.show();
- return app.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement