Search code examples
qtqmlaccessibility

Qt/QML Windows App very slow when grammarly app is running


We are developing a large Qt/QML Application and recently experienced an interesting issue: The application is unusable slow if "grammarly" is installed. Grammarly seems to use Windows Accessibilty and tries to "read" or process our apps screen. This makes it unusable slow.

Everything works fine if grammarly is closed before starting our app.

Is there a way to fix this in our app? I tried setting"QT_ACCESSIBILITY=0" in the environment, but this did not help.

Do I have rebuild Qt by my own to disable this?

BTW: We are using Qt 5.15.2 opensource.

I anyone wants to try this out:

Grammarly: https://www.grammarly.com/desktop

App "Oxygen": https://ccc.dewetron.com/dl/634d2acf-ff00-457c-ae48-4e56d9c49a3c

Thanks for your answers.


Solution

  • I found a working solution for our problem. Install custom empty handler for updates and the QObject root object:

    void DummyUpdateHandler(QAccessibleEvent* event)
    {
    }
    
    void DummyRootObjectHandler(QObject*)
    {
    }
    
    void initQML(QQuickView* view)
    {
    #ifdef WIN32 
            QAccessible::installUpdateHandler(DummyUpdateHandler);
            QAccessible::installRootObjectHandler(DummyRootObjectHandler);
    #endif
            view->setSource(qml_file);
    } 
    

    The application is no longer slowed down by grammarly or other accessibility tools.

    bye Gunther