简体   繁体   中英

Qt5 (c++) android listening for system buttons

I want to use the menu button in my android app (4.x so usually software, not hardware buttons) but I can't find a suitable QEvent to do so. I tried to do

bool GLViewer::event(QEvent * e){
    qDebug()<<e->type();
}

But pressing the menu button had no output, I'm assuming because the menu button is outside the widget. How do I listen for this type of event?

作为此阅读 ,您可以在主窗口上使用的keyReleaseEvent()。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM