Python - QT

11-20-2015 10:53 PM
New Contributor

Dear All,

I am new to using the AppStudio and the Mobile application coding in general. First of all, i need your guidance as of how to start an efficient start using this product. Secondly, If i have a Python code that fulfills certain functionality, can i use this Python code in AppStudio QT creator to have the same code running in my application?


Tags (1)
0 Kudos
1 Reply
Occasional Contributor III

Hi Hussein,

It is not possible to use AppStudio and python conveniently at the moment, however there are some approaches you could take.

Following this blog article Qt Creator can support Python.  However this was done with the Qt SDK c++ environment. You may want to try this out.

Using Python and QML to build native apps | ArcGIS Blog

Another approach is that the AppFramework could open a script. the example I am showing is a windows batch file but there is no reason why it couldn't run your python scripts

import QtQuick 2.3

import ArcGIS.AppFramework 1.0
import ArcGIS.AppFramework.Controls 1.0
App {
    id: app
    width: 400
    height: 640
    property string batFile: "C:/Users/gare7065/ArcGIS/AppStudio/Data/test.bat"
    Component.onCompleted: Qt.openUrlExternally(AppFramework.resolvedPathUrl(batFile))

The other thing you could is make your python tools GP services and then interact with them via the AppFramework's NetworkRequest object.

There are three options for you. I hope that helps.



0 Kudos