Daniele Esposti's Blog

Compile PySide under Mac OS X

How to setup and compile the latest source code of PySide under Mac OS X Prerequisites Before starting to download and compile, PySide sources you must have some things installed on your system: XCode Python for Mac OS X. In this how-to I will use the 64-bit version Qt toolkit...


Handling Win32 window handler in PySide

To pass a Win32 window handler from a PySide object to a [win32gui.GetDC()](http://docs.activestate.com/activepython/2.7/pywin32/win32gui__GetDC_meth.html) method is not so simple as with PyQt4 or wxPython. I wrote a small test for a C function wich renders a bitmap to a Windows DC and I made a PyQt QMainWindow to show the result....


SWIG tutorial for Mac OS X

In this post I’ll show an updated version of the SWIG tutorial to build a Python module on top of a C library which works under Mac OS X. My test environment: Mac OS X 10.6.6 Python 2.7.1 32bit SWIG 2.0.1 XCode 3.2.5 Here a copy&paste of the original tutorial...


Make tests Qt-friendly

Testing Qt code with the Python unittest module is simple as ever. Take a look to this unittest code: from PyQt4 import QtGui import sys import unittest class TestQtWindow( unittest.TestCase ): app = QtGui.QApplication( sys.argv ) def test_window1(self): window = QtGui.QMainWindow( None ) window.show() self.assertTrue( isinstance( window, QtGui.QMainWindow ) )...


Simple event dispatcher in Python

In this post I’ll show you a simple event dispatcher implementation in Python. Every big UI frameworks can play with events an listener without reinvent the wheel but sometimes you need a very simple way to dispatch and receive events in you application without involve in megabytes of an external...