Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Defining API call to my QT Desktop Application



  • I want to define an API call to a QT desktop Application. My objective is something similar to how we can automate windows applications using python and WIn32 Api calls. Is there any way to implement it with Qt?


  • Lifetime Qt Champion

    Hi
    In what way automate it ?
    Since you write the app your self, you can allow any kind of API.

    However, its hard to give any suggestion as to what would be a good solution as
    its not clear whom will automate it and do you mean the end user should be able to use python for it or how should it work ?



  • I am new to APIs, so could you kindly explain how i can use APIs for this.
    For clarification regarding the automation, i want the end user to be able to utilize the application's functionality from outside through some form of scripting.


  • Lifetime Qt Champion

    @Asif-_
    Hi
    API just means "application programming interface" and in this context just means Any way you like since you will
    program it. In another context its a collection of tools/code/etc , like the Windows Programming API.

    For your use case, you could use Qt own scripting

    https://doc.qt.io/qt-5/qtscript-index.html#scripting-classes

    to allow the user to write a script and have app do it.

    or something like
    http://chaiscript.com/

    There is also option to use
    http://www.swig.org/
    to expose it to python and/or use the python binding
    to create the whole app in python taking the scripting to a new level.

    However, depending on what you actually want to automate, a full scripting
    language might be a bit overkill.


Log in to reply