Advertisement
tasuku

main.cpp

Apr 19th, 2014
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <QtWidgets>
  2.  
  3. int main(int argc, char **argv)
  4. {
  5.     QApplication app(argc, argv);
  6.  
  7.     QToolButton button;
  8.     QAction action(&button);
  9.     action.setShortcut(QKeySequence("X"));
  10.     button.addAction(&action);
  11.     QObject::connect(&action, &QAction::triggered, [=]() {
  12.         qDebug() << "test";
  13.     });
  14.  
  15.     button.show();
  16.     return app.exec();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement