Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qt 我如何为qml编写一个单元测试来点击我之前制作的按钮_Qt_Unit Testing_Qml - Fatal编程技术网

Qt 我如何为qml编写一个单元测试来点击我之前制作的按钮

Qt 我如何为qml编写一个单元测试来点击我之前制作的按钮,qt,unit-testing,qml,Qt,Unit Testing,Qml,我写了一个按钮,如: 长方形{ id:loginButton Rectangle { MouseArea{ } } Property alias lButtonTest:lButton LoginButton{ id:lButton } } 在要创建登录页面的页面中: 长方形{ id:loginButton Rectangle { MouseArea{ } } Property alia

我写了一个按钮,如:

长方形{

 id:loginButton

 Rectangle {
     
      MouseArea{

      }
 }
Property alias lButtonTest:lButton

LoginButton{
     id:lButton
}
}

在要创建登录页面的页面中:

长方形{

 id:loginButton

 Rectangle {
     
      MouseArea{

      }
 }
Property alias lButtonTest:lButton

LoginButton{
     id:lButton
}
}

在Testcase中的函数中:

鼠标点击(loginTestPage.lButtonTest)

但这不是工作。鼠标单击不执行。

请提供,而不是伪代码