Changes between Version 29 and Version 30 of PySideForAndroid


Ignore:
Timestamp:
Feb 17, 2013, 11:22:40 PM (11 years ago)
Author:
Martin Kolman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PySideForAndroid

    v29 v30  
    175175
    176176===== The example Python application =====
     177The example application is basically a normal !PySide application, it imports !PySide, instantiates QApplication and starts the main loop. There is only one main difference in this piece of code:
     178
     179{{{
     180from ctypes import *
     181PROJECT_FOLDER = os.environ['PYSIDE_APPLICATION_FOLDER']
     182# 'PYSIDE_APPLICATION_FOLDER' can be configured in main.h
     183LIB_DIR = os.path.join(PROJECT_FOLDER, 'files/python/lib')
     184SHIBOKEN_SO = os.path.join(LIB_DIR, 'libshiboken.so')
     185PYSIDE_SO = os.path.join(LIB_DIR, 'libpyside.so')
     186}}}
     187
     188Due to some not yet identified bug, unless {{{libshiboken.so}}} & {{{libpyside.so}}} are manually loaded to memory like this, importing any !PySide module fails.
     189
     190'''So make sure this piece of code is somewhere in your application and is executed before import of any !PySide module takes place.'''
     191
     192Regarding the {{{PYSIDE_APPLICATION_FOLDER}}} environmental variable, it is set by the {{{main.cpp}}} wrapper and can be configured in {{{main.h}}} .
    177193
    178194===== Bundling =====