문제

how can I run tests for QtQuick-Applications in the main.cpp? The main.qml have a rectangle and inside some buttons. The test class MouseClick.qml implements the javascript test functions who should push the buttons.

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QTestCase = QTestCase(MouseClick); //????

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/TestApp/main.qml"));
    viewer.showExpanded();

    return app.exec();
}

올바른 솔루션이 없습니다

다른 팁

You can try to look how tests are implemented in Qt. For example

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top