我正在为设备创建测试应用程序,而我正在创建的活动之一是键盘按钮测试。我要测试的按钮之一是主页按钮。现在,使用我创建的活动,每当我按下主页按钮时,设备都会提醒该活动已停止。有什么方法可以保存主页按钮单击数据,以便在重新打开应用程序时显示主页按钮已被单击?我在UI上有几个复选框可以与之一起显示。到目前为止,这是我尝试过的:
Traceback (most recent call last):
File "C:/Users/user1/Documents/program_folder/hello.py", line 2, in <module>
from PySide2.QtWidgets import QApplication, QDialog, QLineEdit, QPushButton
File "C:\Users\user1\venv\program_folder\lib\site-packages\PySide2\__init__.py", line 51, in <module>
_setupQtDirectories()
File "C:\Users\user1\venv\program_folder\lib\site-packages\PySide2\__init__.py", line 21, in _setupQtDirectories
import shiboken2
File "C:\Users\user1\venv\program_folder\lib\site-packages\shiboken2\__init__.py", line 27, in <module>
from .shiboken2 import *
ImportError: DLL load failed: The specified procedure could not be found.
@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
super.onKeyDown(keyCode, event);
switch(keyCode)
{
case KeyEvent.KEYCODE_HOME:
mHomeCheckbox.setChecked(true);
ButtonsList[3] = 1;
return true;
}
return false;
}