如何在QML中模拟Qt / Android中的Home键?

时间:2014-07-29 22:25:27

标签: android qt qml

我想要的只是假装按下Home键而不是Back Key:

Keys.onReleased: { if (event.key === Qt.Key_Back) { // Here I just wanna act like the home key was pressed } }

如何在QML中做到这一点?

1 个答案:

答案 0 :(得分:-1)

Intent i = new Intent(Intent.ACTION_MAIN);
 i.addCategory(Intent.CATEGORY_HOME);
 startActivity(i);