Monday, September 18, 2017

[How To] Convert Qt Designer file.py to Python Code


Assuming input.ui is the file created in Qt Designer, output.py is the python code file name,

  1. open Terminal and cd to input.ui folder.
  2. Type pyuic4 -x input.ui -o output.py and hit Enter
  3. output.py gets created in same folder and run it from Python to get the UI window.





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

[How To] Install PyQt4 and Qt Designer for Python 2


For Ubuntu:

Below is the command to install  PyQt4 and Qt Designer for Python 2

sudo apt-get install pyqt4-dev-tools qt4-designer







If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Wednesday, June 1, 2016

ERROR: build.xml:taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILogger


ERROR:
~/.buildozer/android/platform/android-sdk-XX/tools/ant/build.xml:taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILogger

Context:
Running ant debug for buildozer



SOLUTION:

  1. Back up the Lib folder in /usr/share/ant (check by using whereis ant) of original ant installation.
  2. Make a link of ~/.buildozer/android/platform/android-sdk-XX/tools/lib and copy it to /usr/share/ant so that /usr/share/ant/lib points to ~/.buildozer/android/platform/android-sdk-XX/tools/lib




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Tuesday, May 31, 2016

How to input ${sdk.dir} to build.xml | Apache Ant | Ubuntu

Assuming, $ANDROID_HOME (environmental variable ) refers to android sdk directory, you can inject the ANDROID_HOME  into the sdk.dir property using the following ant command.

$ ant debug -Dsdk.dir=$ANDROID_HOME

ANDROID_HOME must be an absolute path such as /home/username/something/android-sdk





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Mouse cursor not visible | Ubuntu


SOLUTION:
sudo modprobe -r psmouse
sudo modprobe psmouse









If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

android update project: command not found | Ubuntu


Context:
Running android update project

ERROR:
command not found

Solution:

  1. export ANDROID_HOME=/Applications/android-sdks
  2. Add Tools to PATH
    • export PATH=${PATH}:${ANDROID_HOME}/tools
  3. Add platform-tools to PATH
    • export PATH=${PATH}:${ANDROID_HOME}/platform-tools






If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

ERROR: subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1 | Ubuntu | Buildozer


Context:
Running buildozer android debug

ERROR:
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1


SOLUTION:

  1. Go to ~/.buildozer/android/platform/android-sdk-24/tools/ant
  2. Run ant debug
  3. You will find issues.
  4. Sort them out.






If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged