ROS (8): Keyboard control Smartcar

2023-01-05   ES  

Set shortcut keys

    // Set the pause shortcut key
    QAction* action = new QAction(this);
    action->setShortcut(tr("space"));// The space key is the shortcut key
    connect(action, SIGNAL(triggered()), this, SLOT(on_pushButton_5_clicked()));

Set the fast combination key

    // Set the stop shortcut key
    QAction* action1 = new QAction(this);
    action1->setShortcut(tr("ctrl+e"));// Combination shortcut
    connect(action1, SIGNAL(triggered()), this, SLOT(on_pushButton_6_clicked()));

There are other methods on the Internet, so I will not list them one by one


Related Posts

cocos2d-x was imported into eclipse, and appeared after the import org.cocos2dx.lib cannot be resolved error error

16.python-Basic recognition of crawlers, the application of Python variables and string

Little program development component COVER-VIEW, COVER-IMAGE

HDU2049 is not easy to series (4) -Baiden Kaojiu During the National Day, the provincial capital HZ has just held a grand collective wedding. In order to enrich the wedding, the emcee has temporarily came up with an interesting program, called “Groom”, and the specific operation is:

ROS (8): Keyboard control Smartcar

Random Posts

js array, JS object, JSON array, JSON object, JSON string difference and connection

In GitHub’s public source code, causing millions of losses, DJI programmers have been sentenced to 6 months, and those who fined 200,000 programs

response.getWriter (). The difference between write () and out.print ()

reactnative Routing: React-navigation 6.x Basic use of Copyer

Solution SwipeRefreshLayout and ScrollView sliding conflict