Qtitan Components for PySide2 - Quickstart Guide

Qtitan Components for PySide2 - Quickstart Guide

Topic describes how to include the Qtitan components for the regular Python App. The steps described in this topic are relevant to any Qtitan component - QtitanRibbon, QtitanDataGrid, QtitanNavigationDesignUI, QtitanChart, QtitanDocking.


To use Qtitan Component for Python, you'll need:

Step 1: Install Qtitan Component for Python

  • Goto to the page https://www.devmachines.com/download-for-qt.html
  • Download the installer for platform you use. Components that are needed for Python have the suffix PySide2 in the installer name.
  • Install it following the recommendations of the installer wizard.
  • After install process you'll have python bindings in the <QTITAN_INSTALL_PATH>site-packages/DevMachines folder.
    Additionally the bindings will be installed to the your Python third-party libraries folder where the PySide2 was installed.
    For instance:

    To get Python site-packages directory for your environment execute the following command line in the shell:

    python -c "import site; print(site.getsitepackages())"

Step 2: Add component to your Python file (*.py)

Add the Qtitan Component to the Python file. All component in the DevMachines namespace.

from DevMachines.QtitanBase import WindowTitleBar
from DevMachines.QtitanRibbon import AdobePhotoshopStyle, Office2016Style

By analogy for other Qtitan components:

from DevMachines.QtitanGrid import Grid
from DevMachines.QtitanNavigationDesignUI import NavigationView

Step 3: Run you Python App

Run your Python App and make sure that there are no any errors and warnings.

Building the Qtitan Component binding for Python from sources

Topic describes how to build the Qtitan components bindings for Python from sources.

Windows Visual Studio

For Visual Studio you have to use Visual Studio Toolkit 2015 to buld the bindings. If you will use 2017 Toolkit you will have errors from the shiboken2-generator.

Open the bat shell. "Windows logo key" + R, cmd.exe
Set current directory to the <QTITAN_INSTALL_PATH>. C:/>dir <QTITAN_INSTALL_PATH>
qmake.exe -r CONFIG+=python -platform win32-msvc
nmake release

After the build process you will have a new binding libraries in the <QTITAN_INSTALL_PATH>site-packages/DevMachines folder.